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
This commit is contained in:
Florian Rommel 2022-06-03 03:03:03 +02:00 committed by Po Lu
parent 06afa7b4e0
commit bbca04fd9d
4 changed files with 30 additions and 20 deletions

View file

@ -2866,7 +2866,7 @@ if test "${opsys}" != "mingw32"; then
if test "${window_system}" = "x11"; then
GTK_REQUIRED=3.10
else
GTK_REQUIRED=3.20
GTK_REQUIRED=3.22.23
fi
GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"

View file

@ -1746,15 +1746,16 @@ fit will be clipped by the window manager.
@item fullscreen
This parameter specifies whether to maximize the frame's width, height
or both. Its value can be @code{fullwidth}, @code{fullheight},
@code{fullboth}, or @code{maximized}. A @dfn{fullwidth} frame is as
wide as possible, a @dfn{fullheight} frame is as tall as possible, and
a @dfn{fullboth} frame is both as wide and as tall as possible. A
@dfn{maximized} frame is like a ``fullboth'' frame, except that it
usually keeps its title bar and the buttons for resizing and closing
the frame. Also, maximized frames typically avoid hiding any task bar
or panels displayed on the desktop. A ``fullboth'' frame, on the
other hand, usually omits the title bar and occupies the entire
available screen space.
@code{fullboth}, or @code{maximized}.@footnote{On PGTK frames, setting
the values @code{fullheight} and @code{fullwidth} has no effect.} A
@dfn{fullwidth} frame is as wide as possible, a @dfn{fullheight} frame
is as tall as possible, and a @dfn{fullboth} frame is both as wide and
as tall as possible. A @dfn{maximized} frame is like a ``fullboth''
frame, except that it usually keeps its title bar and the buttons for
resizing and closing the frame. Also, maximized frames typically
avoid hiding any task bar or panels displayed on the desktop. A
``fullboth'' frame, on the other hand, usually omits the title bar and
occupies the entire available screen space.
Full-height and full-width frames are more similar to maximized
frames in this regard. However, these typically display an external

View file

@ -85,7 +85,7 @@ after deleting lisp/leim/ja-dic/ja-dic.el.
+++
** Emacs now supports being built with pure GTK.
To use this option, make sure the GTK 3 (version 3.20 or later) and
To use this option, make sure the GTK 3 (version 3.22.23 or later) and
Cairo development files are installed, and configure Emacs with the
option '--with-pgtk'. Unlike the default X and GTK build, the
resulting Emacs binary will work on any underlying window system

View file

@ -5454,15 +5454,18 @@ window_state_event (GtkWidget *widget,
gpointer *user_data)
{
struct frame *f = pgtk_any_window_to_frame (event->window_state.window);
GdkWindowState new_state;
union buffered_input_event inev;
new_state = event->window_state.new_window_state;
EVENT_INIT (inev.ie);
inev.ie.kind = NO_EVENT;
inev.ie.arg = Qnil;
if (f)
{
if (event->window_state.new_window_state & GDK_WINDOW_STATE_FOCUSED)
if (new_state & GDK_WINDOW_STATE_FOCUSED)
{
if (FRAME_ICONIFIED_P (f))
{
@ -5478,17 +5481,24 @@ window_state_event (GtkWidget *widget,
}
}
if (event->window_state.new_window_state
& GDK_WINDOW_STATE_FULLSCREEN)
if (new_state & GDK_WINDOW_STATE_FULLSCREEN)
store_frame_param (f, Qfullscreen, Qfullboth);
else if (event->window_state.new_window_state
& GDK_WINDOW_STATE_MAXIMIZED)
else if (new_state & GDK_WINDOW_STATE_MAXIMIZED)
store_frame_param (f, Qfullscreen, Qmaximized);
else if ((new_state & GDK_WINDOW_STATE_TOP_TILED)
&& (new_state & GDK_WINDOW_STATE_BOTTOM_TILED)
&& !(new_state & GDK_WINDOW_STATE_TOP_RESIZABLE)
&& !(new_state & GDK_WINDOW_STATE_BOTTOM_RESIZABLE))
store_frame_param (f, Qfullscreen, Qfullheight);
else if ((new_state & GDK_WINDOW_STATE_LEFT_TILED)
&& (new_state & GDK_WINDOW_STATE_RIGHT_TILED)
&& !(new_state & GDK_WINDOW_STATE_LEFT_RESIZABLE)
&& !(new_state & GDK_WINDOW_STATE_RIGHT_RESIZABLE))
store_frame_param (f, Qfullscreen, Qfullwidth);
else
store_frame_param (f, Qfullscreen, Qnil);
if (event->window_state.new_window_state
& GDK_WINDOW_STATE_ICONIFIED)
if (new_state & GDK_WINDOW_STATE_ICONIFIED)
SET_FRAME_ICONIFIED (f, true);
else
{
@ -5498,8 +5508,7 @@ window_state_event (GtkWidget *widget,
SET_FRAME_ICONIFIED (f, false);
}
if (event->window_state.new_window_state
& GDK_WINDOW_STATE_STICKY)
if (new_state & GDK_WINDOW_STATE_STICKY)
store_frame_param (f, Qsticky, Qt);
else
store_frame_param (f, Qsticky, Qnil);