aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Rommel2022-06-03 03:03:03 +0200
committerPo Lu2022-07-04 10:21:14 +0800
commitbbca04fd9d10ec2a5e849c48eab42faad0de0a32 (patch)
treea24ffa40795ff4e40c505d614d37ee71b8ede2de
parent06afa7b4e096b14d03cc801235b27395a9857272 (diff)
downloademacs-bbca04fd9d10ec2a5e849c48eab42faad0de0a32.tar.gz
emacs-bbca04fd9d10ec2a5e849c48eab42faad0de0a32.zip
Add support for fullscreen values fullheight and fullwidth on PGTK
* src/pgtkterm.c (window_state_event): Support values fullheight and fullwidth for the fullscreen frame-parameter * doc/lispref/frames.texi (Size Parameters): Document inability to actively set hullheight/fullwidth for PGTK frames * configure.ac: Bump GTK version for PGTK * etc/NEWS: Change GTK version in PGTK announcement
-rw-r--r--configure.ac2
-rw-r--r--doc/lispref/frames.texi19
-rw-r--r--etc/NEWS2
-rw-r--r--src/pgtkterm.c27
4 files changed, 30 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac
index ad3df5d7312..a016d464f34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2866,7 +2866,7 @@ if test "${opsys}" != "mingw32"; then
2866 if test "${window_system}" = "x11"; then 2866 if test "${window_system}" = "x11"; then
2867 GTK_REQUIRED=3.10 2867 GTK_REQUIRED=3.10
2868 else 2868 else
2869 GTK_REQUIRED=3.20 2869 GTK_REQUIRED=3.22.23
2870 fi 2870 fi
2871 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" 2871 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
2872 2872
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index f655ccdfa73..ed56fa777d2 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -1746,15 +1746,16 @@ fit will be clipped by the window manager.
1746@item fullscreen 1746@item fullscreen
1747This parameter specifies whether to maximize the frame's width, height 1747This parameter specifies whether to maximize the frame's width, height
1748or both. Its value can be @code{fullwidth}, @code{fullheight}, 1748or both. Its value can be @code{fullwidth}, @code{fullheight},
1749@code{fullboth}, or @code{maximized}. A @dfn{fullwidth} frame is as 1749@code{fullboth}, or @code{maximized}.@footnote{On PGTK frames, setting
1750wide as possible, a @dfn{fullheight} frame is as tall as possible, and 1750the values @code{fullheight} and @code{fullwidth} has no effect.} A
1751a @dfn{fullboth} frame is both as wide and as tall as possible. A 1751@dfn{fullwidth} frame is as wide as possible, a @dfn{fullheight} frame
1752@dfn{maximized} frame is like a ``fullboth'' frame, except that it 1752is as tall as possible, and a @dfn{fullboth} frame is both as wide and
1753usually keeps its title bar and the buttons for resizing and closing 1753as tall as possible. A @dfn{maximized} frame is like a ``fullboth''
1754the frame. Also, maximized frames typically avoid hiding any task bar 1754frame, except that it usually keeps its title bar and the buttons for
1755or panels displayed on the desktop. A ``fullboth'' frame, on the 1755resizing and closing the frame. Also, maximized frames typically
1756other hand, usually omits the title bar and occupies the entire 1756avoid hiding any task bar or panels displayed on the desktop. A
1757available screen space. 1757``fullboth'' frame, on the other hand, usually omits the title bar and
1758occupies the entire available screen space.
1758 1759
1759Full-height and full-width frames are more similar to maximized 1760Full-height and full-width frames are more similar to maximized
1760frames in this regard. However, these typically display an external 1761frames in this regard. However, these typically display an external
diff --git a/etc/NEWS b/etc/NEWS
index 3d679fdec6f..3836efa6927 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -85,7 +85,7 @@ after deleting lisp/leim/ja-dic/ja-dic.el.
85 85
86+++ 86+++
87** Emacs now supports being built with pure GTK. 87** Emacs now supports being built with pure GTK.
88To use this option, make sure the GTK 3 (version 3.20 or later) and 88To use this option, make sure the GTK 3 (version 3.22.23 or later) and
89Cairo development files are installed, and configure Emacs with the 89Cairo development files are installed, and configure Emacs with the
90option '--with-pgtk'. Unlike the default X and GTK build, the 90option '--with-pgtk'. Unlike the default X and GTK build, the
91resulting Emacs binary will work on any underlying window system 91resulting Emacs binary will work on any underlying window system
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 1eb4d378adf..b283cef7cde 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -5454,15 +5454,18 @@ window_state_event (GtkWidget *widget,
5454 gpointer *user_data) 5454 gpointer *user_data)
5455{ 5455{
5456 struct frame *f = pgtk_any_window_to_frame (event->window_state.window); 5456 struct frame *f = pgtk_any_window_to_frame (event->window_state.window);
5457 GdkWindowState new_state;
5457 union buffered_input_event inev; 5458 union buffered_input_event inev;
5458 5459
5460 new_state = event->window_state.new_window_state;
5461
5459 EVENT_INIT (inev.ie); 5462 EVENT_INIT (inev.ie);
5460 inev.ie.kind = NO_EVENT; 5463 inev.ie.kind = NO_EVENT;
5461 inev.ie.arg = Qnil; 5464 inev.ie.arg = Qnil;
5462 5465
5463 if (f) 5466 if (f)
5464 { 5467 {
5465 if (event->window_state.new_window_state & GDK_WINDOW_STATE_FOCUSED) 5468 if (new_state & GDK_WINDOW_STATE_FOCUSED)
5466 { 5469 {
5467 if (FRAME_ICONIFIED_P (f)) 5470 if (FRAME_ICONIFIED_P (f))
5468 { 5471 {
@@ -5478,17 +5481,24 @@ window_state_event (GtkWidget *widget,
5478 } 5481 }
5479 } 5482 }
5480 5483
5481 if (event->window_state.new_window_state 5484 if (new_state & GDK_WINDOW_STATE_FULLSCREEN)
5482 & GDK_WINDOW_STATE_FULLSCREEN)
5483 store_frame_param (f, Qfullscreen, Qfullboth); 5485 store_frame_param (f, Qfullscreen, Qfullboth);
5484 else if (event->window_state.new_window_state 5486 else if (new_state & GDK_WINDOW_STATE_MAXIMIZED)
5485 & GDK_WINDOW_STATE_MAXIMIZED)
5486 store_frame_param (f, Qfullscreen, Qmaximized); 5487 store_frame_param (f, Qfullscreen, Qmaximized);
5488 else if ((new_state & GDK_WINDOW_STATE_TOP_TILED)
5489 && (new_state & GDK_WINDOW_STATE_BOTTOM_TILED)
5490 && !(new_state & GDK_WINDOW_STATE_TOP_RESIZABLE)
5491 && !(new_state & GDK_WINDOW_STATE_BOTTOM_RESIZABLE))
5492 store_frame_param (f, Qfullscreen, Qfullheight);
5493 else if ((new_state & GDK_WINDOW_STATE_LEFT_TILED)
5494 && (new_state & GDK_WINDOW_STATE_RIGHT_TILED)
5495 && !(new_state & GDK_WINDOW_STATE_LEFT_RESIZABLE)
5496 && !(new_state & GDK_WINDOW_STATE_RIGHT_RESIZABLE))
5497 store_frame_param (f, Qfullscreen, Qfullwidth);
5487 else 5498 else
5488 store_frame_param (f, Qfullscreen, Qnil); 5499 store_frame_param (f, Qfullscreen, Qnil);
5489 5500
5490 if (event->window_state.new_window_state 5501 if (new_state & GDK_WINDOW_STATE_ICONIFIED)
5491 & GDK_WINDOW_STATE_ICONIFIED)
5492 SET_FRAME_ICONIFIED (f, true); 5502 SET_FRAME_ICONIFIED (f, true);
5493 else 5503 else
5494 { 5504 {
@@ -5498,8 +5508,7 @@ window_state_event (GtkWidget *widget,
5498 SET_FRAME_ICONIFIED (f, false); 5508 SET_FRAME_ICONIFIED (f, false);
5499 } 5509 }
5500 5510
5501 if (event->window_state.new_window_state 5511 if (new_state & GDK_WINDOW_STATE_STICKY)
5502 & GDK_WINDOW_STATE_STICKY)
5503 store_frame_param (f, Qsticky, Qt); 5512 store_frame_param (f, Qsticky, Qt);
5504 else 5513 else
5505 store_frame_param (f, Qsticky, Qnil); 5514 store_frame_param (f, Qsticky, Qnil);