all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Philipp Stephani <p.stephani2@gmail.com>, 28189@debbugs.gnu.org
Subject: bug#28189: 26.0.50; Emacs uses deprecated function gtk_window_parse_geometry
Date: Sat, 26 Aug 2017 11:29:52 +0200	[thread overview]
Message-ID: <59A13F90.5080804@gmx.at> (raw)
In-Reply-To: <CAArVCkS793xfAwajWDaDsfYy=i9Bghzk_OW_57TVUwAvcTH9gQ@mail.gmail.com>

 > 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	other threads:[~2017-08-26  9:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-22 20:22 bug#28189: 26.0.50; Emacs uses deprecated function gtk_window_parse_geometry Philipp
2017-08-23  8:46 ` martin rudalics
2017-08-23 10:38   ` Philipp Stephani
2017-08-23 13:19     ` martin rudalics
2017-08-23 23:26       ` Philipp Stephani
2017-08-24  9:37         ` martin rudalics
2017-08-25  9:28         ` Philipp Stephani
2017-08-26  9:29           ` martin rudalics [this message]
2017-08-27 13:34             ` Philipp Stephani
2017-09-03 11:49               ` martin rudalics
2017-09-19 15:35                 ` Philipp Stephani
2017-09-19 16:38                   ` Philipp Stephani
2017-09-23 11:22               ` Philipp Stephani
2017-09-23 13:21                 ` martin rudalics
2017-09-23 13:28                   ` Eli Zaretskii
2017-09-23 16:32                     ` Philipp Stephani
2017-09-23 16:48                       ` Eli Zaretskii
2017-09-23 18:28                     ` martin rudalics
2017-09-23 18:31                       ` Eli Zaretskii
2017-09-23 16:36                   ` Philipp Stephani
2017-09-23 18:29                     ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59A13F90.5080804@gmx.at \
    --to=rudalics@gmx.at \
    --cc=28189@debbugs.gnu.org \
    --cc=p.stephani2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.