bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28189: 26.0.50; Emacs uses deprecated function gtk_window_parse_geom


From: martin rudalics
Subject: bug#28189: 26.0.50; Emacs uses deprecated function gtk_window_parse_geometry
Date: Sat, 26 Aug 2017 11:29:52 +0200

> I've attached a patch that fixes all deprecation warnings. It's not
> intended to be installed as-is, more as a baseline for discussion. Some of
> the functions have straightforward replacements, others are harder to
> replace, yet others have vanished altogether.

I think you should install most of it right now so we have enough time
to test it before a release.  There are people who build with GTK 3.22
and could tell us whether it breaks anything (substantially, at least).
The sooner we know the better.

This one

+#if GTK_CHECK_VERSION (3, 16, 0)
+      emacs_abort ();
+#else

looks a bit harsh and the corresponding logic appears quite contrived.
Maybe the entire function should be rewritten.

Removing the gtk_adjustment_changed calls should be tested ASAP.  The
changes where an alternative is provided like this one

+#if GTK_CHECK_VERSION (3, 20, 0)
+      GdkDevice *gdev
+        = gdk_seat_get_pointer (gdk_display_get_default_seat (gdpy));
+#else
       GdkDevice *gdev = gdk_device_manager_get_client_pointer
         (gdk_display_get_device_manager (gdpy));
+#endif

should be installed in any case and this one

+#if GTK_CHECK_VERSION (3, 20, 0)
+  gtk_widget_set_focus_on_click (wb, FALSE);
+#else
   gtk_button_set_focus_on_click (GTK_BUTTON (wb), FALSE);
+#endif

obviously too.  This one

+#if GTK_CHECK_VERSION (3, 16, 0)
+  g_object_set (settings,
+                "gtk-menu-bar-accel", EMACS_CLASS,
+                "gtk-key-theme-name", "Emacs",
+                NULL);
+#else
   /* Remove F10 as a menu accelerator, it does not mix well with Emacs key
      bindings.  It doesn't seem to be any way to remove properties,
      so we set it to "" which in means "no key".  */
@@ -5243,6 +5283,7 @@ xg_initialize (void)
                                     "gtk-key-theme-name",
                                     "Emacs",
                                     EMACS_CLASS);
+#endif

looks good too.  All monitor/screen related changes seem harmless to me
and should be provided as well.  I'm not sure what you mean here

+  /* FIXME: This function assumes that GdkMonitor objects are never
+   * destroyed, even if the monitor is unplugged.  That’s probably the
+   * case, but should be verified.  */

If this is a problem it is a problem already now.  Or am I missing
something?

Maybe the menu related changes (although self-contained) should be done
in a separate fix.  In particular this

-      /* Adjust coordinates to be root-window-relative.  */
+      /* Adjust coordinates to be root-window-relative, but not for
+       * GTK+ 3.22, where the menu position is frame-relative.  */

and the subsequent

+#if GTK_CHECK_VERSION (3, 22, 0)
+  /* FIXME: We should pass the GDK event to this function instead of
+   * synthesizing it.  */

(I think you might want to get this from event_handler_gdk) look more
complicated and at least warrant larger comments.

I have no idea about the cairo related change.  But the XSync change
looks definitely good too.

Thanks, martin






reply via email to

[Prev in Thread] Current Thread [Next in Thread]