aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Stephani2017-08-27 12:38:46 +0200
committerPhilipp Stephani2017-08-27 14:45:58 +0200
commitfe49aa17d505f13926eac2212b89effec9bd3c98 (patch)
tree0e18167d26acdf2e4880041a4d2ae3c7a7f17464
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.
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/subr.el2
-rw-r--r--src/gtkutil.c6
-rw-r--r--src/xterm.c3
4 files changed, 14 insertions, 1 deletions
diff --git a/etc/NEWS b/etc/NEWS
index d53e0d25f78..6cd4bcac795 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1261,6 +1261,10 @@ break.
1261** The arguments LOCKNAME and MUSTBENEW of 'write-region' are 1261** The arguments LOCKNAME and MUSTBENEW of 'write-region' are
1262propagated to file name handlers now. 1262propagated to file name handlers now.
1263 1263
1264** When built against recent versions of GTK+, Emacs always uses
1265gtk_window_move for moving frames and ignores the value of the
1266variable 'x-gtk-use-window-move'. The variable is now obsolete.
1267
1264 1268
1265* Lisp Changes in Emacs 26.1 1269* Lisp Changes in Emacs 26.1
1266 1270
diff --git a/lisp/subr.el b/lisp/subr.el
index b3f9f902349..2ad52f6a638 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1478,6 +1478,8 @@ be a list of the form returned by `event-start' and `event-end'."
1478;; but Stefan insists to mark it so. 1478;; but Stefan insists to mark it so.
1479(make-obsolete-variable 'translation-table-for-input nil "23.1") 1479(make-obsolete-variable 'translation-table-for-input nil "23.1")
1480 1480
1481(make-obsolete-variable 'x-gtk-use-window-move nil "26.1")
1482
1481(defvaralias 'messages-buffer-max-lines 'message-log-max) 1483(defvaralias 'messages-buffer-max-lines 'message-log-max)
1482 1484
1483;;;; Alternate names for functions - these are not being phased out. 1485;;;; Alternate names for functions - these are not being phased out.
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}