summaryrefslogtreecommitdiff
path: root/src/gtkutil.c
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2017-08-27 12:38:46 +0200
committerPhilipp Stephani <phst@google.com>2017-08-27 14:45:58 +0200
commitfe49aa17d505f13926eac2212b89effec9bd3c98 (patch)
tree0e18167d26acdf2e4880041a4d2ae3c7a7f17464 /src/gtkutil.c
parent208a3cb05f4d954abc9dd6c8cd858ef2bedd7cb4 (diff)
downloademacs-fe49aa17d505f13926eac2212b89effec9bd3c98.tar.gz
Always use gtk_window_move in new versions
* src/gtkutil.c (my_log_handler): Don’t define in new versions of GTK+. (xg_set_geometry): Always use gtk_window_move in new versions of GTK+. * src/xterm.c (syms_of_xterm): Document that x-gtk-use-window-move is ignored. * lisp/subr.el (x-gtk-use-window-move): Make obsolete.
Diffstat (limited to 'src/gtkutil.c')
-rw-r--r--src/gtkutil.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 7a110daef1e..a2e9f266758 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -792,6 +792,7 @@ xg_hide_tooltip (struct frame *f)
General functions for creating widgets, resizing, events, e.t.c.
***********************************************************************/
+#if ! GTK_CHECK_VERSION (3, 22, 0)
static void
my_log_handler (const gchar *log_domain, GLogLevelFlags log_level,
const gchar *msg, gpointer user_data)
@@ -799,6 +800,7 @@ my_log_handler (const gchar *log_domain, GLogLevelFlags log_level,
if (!strstr (msg, "visible children"))
fprintf (stderr, "XX %s-WARNING **: %s\n", log_domain, msg);
}
+#endif
/* Make a geometry string and pass that to GTK. It seems this is the
only way to get geometry position right if the user explicitly
@@ -810,8 +812,10 @@ xg_set_geometry (struct frame *f)
{
if (f->size_hint_flags & (USPosition | PPosition))
{
+#if ! GTK_CHECK_VERSION (3, 22, 0)
if (x_gtk_use_window_move)
{
+#endif
/* Handle negative positions without consulting
gtk_window_parse_geometry (Bug#25851). The position will
be off by scrollbar width + window manager decorations. */
@@ -828,6 +832,7 @@ xg_set_geometry (struct frame *f)
/* Reset size hint flags. */
f->size_hint_flags &= ~ (XNegative | YNegative);
+# if ! GTK_CHECK_VERSION (3, 22, 0)
}
else
{
@@ -859,6 +864,7 @@ xg_set_geometry (struct frame *f)
g_log_remove_handler ("Gtk", id);
}
+#endif
}
}