aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhilipp Stephani2017-08-27 12:38:46 +0200
committerPhilipp Stephani2017-08-27 14:45:58 +0200
commitfe49aa17d505f13926eac2212b89effec9bd3c98 (patch)
tree0e18167d26acdf2e4880041a4d2ae3c7a7f17464 /src
parent208a3cb05f4d954abc9dd6c8cd858ef2bedd7cb4 (diff)
downloademacs-fe49aa17d505f13926eac2212b89effec9bd3c98.tar.gz
emacs-fe49aa17d505f13926eac2212b89effec9bd3c98.zip
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')
-rw-r--r--src/gtkutil.c6
-rw-r--r--src/xterm.c3
2 files changed, 8 insertions, 1 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)
792 General functions for creating widgets, resizing, events, e.t.c. 792 General functions for creating widgets, resizing, events, e.t.c.
793 ***********************************************************************/ 793 ***********************************************************************/
794 794
795#if ! GTK_CHECK_VERSION (3, 22, 0)
795static void 796static void
796my_log_handler (const gchar *log_domain, GLogLevelFlags log_level, 797my_log_handler (const gchar *log_domain, GLogLevelFlags log_level,
797 const gchar *msg, gpointer user_data) 798 const gchar *msg, gpointer user_data)
@@ -799,6 +800,7 @@ my_log_handler (const gchar *log_domain, GLogLevelFlags log_level,
799 if (!strstr (msg, "visible children")) 800 if (!strstr (msg, "visible children"))
800 fprintf (stderr, "XX %s-WARNING **: %s\n", log_domain, msg); 801 fprintf (stderr, "XX %s-WARNING **: %s\n", log_domain, msg);
801} 802}
803#endif
802 804
803/* Make a geometry string and pass that to GTK. It seems this is the 805/* Make a geometry string and pass that to GTK. It seems this is the
804 only way to get geometry position right if the user explicitly 806 only way to get geometry position right if the user explicitly
@@ -810,8 +812,10 @@ xg_set_geometry (struct frame *f)
810{ 812{
811 if (f->size_hint_flags & (USPosition | PPosition)) 813 if (f->size_hint_flags & (USPosition | PPosition))
812 { 814 {
815#if ! GTK_CHECK_VERSION (3, 22, 0)
813 if (x_gtk_use_window_move) 816 if (x_gtk_use_window_move)
814 { 817 {
818#endif
815 /* Handle negative positions without consulting 819 /* Handle negative positions without consulting
816 gtk_window_parse_geometry (Bug#25851). The position will 820 gtk_window_parse_geometry (Bug#25851). The position will
817 be off by scrollbar width + window manager decorations. */ 821 be off by scrollbar width + window manager decorations. */
@@ -828,6 +832,7 @@ xg_set_geometry (struct frame *f)
828 832
829 /* Reset size hint flags. */ 833 /* Reset size hint flags. */
830 f->size_hint_flags &= ~ (XNegative | YNegative); 834 f->size_hint_flags &= ~ (XNegative | YNegative);
835# if ! GTK_CHECK_VERSION (3, 22, 0)
831 } 836 }
832 else 837 else
833 { 838 {
@@ -859,6 +864,7 @@ xg_set_geometry (struct frame *f)
859 864
860 g_log_remove_handler ("Gtk", id); 865 g_log_remove_handler ("Gtk", id);
861 } 866 }
867#endif
862 } 868 }
863} 869}
864 870
diff --git a/src/xterm.c b/src/xterm.c
index d9a6df75d97..eff1519bf48 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -13311,6 +13311,7 @@ transition between the various maximization states. */);
13311 doc: /* Non-nil means rely on gtk_window_move to set frame positions. 13311 doc: /* Non-nil means rely on gtk_window_move to set frame positions.
13312If this variable is t (the default), the GTK build uses the function 13312If this variable is t (the default), the GTK build uses the function
13313gtk_window_move to set or store frame positions and disables some time 13313gtk_window_move to set or store frame positions and disables some time
13314consuming frame position adjustments. */); 13314consuming frame position adjustments. In newer versions of GTK, Emacs
13315always uses gtk_window_move and ignores the value of this variable. */);
13315 x_gtk_use_window_move = true; 13316 x_gtk_use_window_move = true;
13316} 13317}