From: Pip Cet <pipcet@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: 21317@debbugs.gnu.org
Subject: bug#21317: 25.0.50; frame-resize-pixelwise has no effect (GTK, no window manager)
Date: Sun, 23 Aug 2015 12:29:30 +0000 [thread overview]
Message-ID: <CAOqdjBf172LNM4sLFbyhA54u5k0GF89+MEGFYa3ut5oOof0qvA@mail.gmail.com> (raw)
In-Reply-To: <CAOqdjBf+WOeQFup3ePBHQv_c-d8UAxJhiL+yTLTFrHmJpr-V9Q@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 809 bytes --]
Sorry, I accidentally sent that email half-finished.
On Sun, Aug 23, 2015 at 12:20 PM, Pip Cet <pipcet@gmail.com> wrote:
>>> I'm not a hundred percent certain; from reading the thread, I think
>>> it's the former: the window is in full-screen mode and starts
>>> shrinking. I've installed KWin but have been unable to produce buggy
>>> behavior, so far, without the workaround in gtkutil.c.
>>
>> I attach a patch that should handle the case where we want to switch
>> from a non-fullscreen to a fullscreen frame. Please try it.
That patch has no effect, but that's consistent with my understanding
of the situation; it might have an effect on users of the buggy KWin
version.
I've attached a patch that combines your patch with the minor fixes I
suggested in the previous email. It appears to work here.
[-- Attachment #2: 0001-Fix-fullscreen-issue.patch --]
[-- Type: text/x-patch, Size: 3735 bytes --]
From af8d69d52190a98264cfc0ef9ceedcfbd2f0d37d Mon Sep 17 00:00:00 2001
From: Philip <pipcet@gmail.com>
Date: Sun, 23 Aug 2015 12:24:04 +0000
Subject: [PATCH] Fix fullscreen issue
---
src/gtkutil.c | 16 +++++++++-------
src/xterm.c | 27 +++++++++++++++++++++++++--
2 files changed, 34 insertions(+), 9 deletions(-)
diff --git a/src/gtkutil.c b/src/gtkutil.c
index d684cd9..8e53a16 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -135,6 +135,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
static void update_theme_scrollbar_width (void);
static void update_theme_scrollbar_height (void);
+bool get_current_wm_state (struct frame *, Window, int *, bool *);
+
#define TB_INFO_KEY "xg_frame_tb_info"
struct xg_frame_tb_info
{
@@ -1364,7 +1366,8 @@ x_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
int base_width, base_height;
int min_rows = 0, min_cols = 0;
int win_gravity = f->win_gravity;
- Lisp_Object fs_state, frame;
+ int state = FULLSCREEN_NONE;
+ bool sticky = false;
int scale = xg_get_gdk_scale ();
/* Don't set size hints during initialization; that apparently leads
@@ -1373,13 +1376,12 @@ x_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
if (NILP (Vafter_init_time) || !FRAME_GTK_OUTER_WIDGET (f))
return;
- XSETFRAME (frame, f);
- fs_state = Fframe_parameter (frame, Qfullscreen);
- if (EQ (fs_state, Qmaximized) || EQ (fs_state, Qfullboth))
+ get_current_wm_state (f, FRAME_OUTER_WINDOW (f), &state, &sticky);
+ if (state != FULLSCREEN_NONE)
{
- /* Don't set hints when maximized or fullscreen. Apparently KWin and
- Gtk3 don't get along and the frame shrinks (!).
- */
+ /* Don't set hints when the frame currently is maximized or
+ fullscreen. Apparently KWin and Gtk3 don't get along and the
+ frame shrinks (!). */
return;
}
diff --git a/src/xterm.c b/src/xterm.c
index b7aacfa..60e72a9 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -247,7 +247,7 @@ static void x_wm_set_window_state (struct frame *, int);
static void x_wm_set_icon_pixmap (struct frame *, ptrdiff_t);
static void x_initialize (void);
-static bool get_current_wm_state (struct frame *, Window, int *, bool *);
+bool get_current_wm_state (struct frame *, Window, int *, bool *);
/* Flush display of frame F. */
@@ -9904,7 +9904,7 @@ x_set_sticky (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
Return true iff we are not hidden. */
-static bool
+bool
get_current_wm_state (struct frame *f,
Window window,
int *size_state,
@@ -10155,6 +10155,8 @@ x_handle_net_wm_state (struct frame *f, const XPropertyEvent *event)
static void
x_check_fullscreen (struct frame *f)
{
+ Lisp_Object lval;
+
if (do_ewmh_fullscreen (f))
return;
@@ -10189,6 +10191,8 @@ x_check_fullscreen (struct frame *f)
frame_size_history_add
(f, Qx_check_fullscreen, width, height, Qnil);
+ x_wm_set_size_hint (f, 0, false);
+
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
width, height);
@@ -10201,6 +10205,25 @@ x_check_fullscreen (struct frame *f)
x_sync (f);
}
}
+
+ lval = Qnil;
+ switch (f->want_fullscreen)
+ {
+ case FULLSCREEN_WIDTH:
+ lval = Qfullwidth;
+ break;
+ case FULLSCREEN_HEIGHT:
+ lval = Qfullheight;
+ break;
+ case FULLSCREEN_BOTH:
+ lval = Qfullboth;
+ break;
+ case FULLSCREEN_MAXIMIZED:
+ lval = Qmaximized;
+ break;
+ }
+
+ store_frame_param (f, Qfullscreen, lval);
}
/* This function is called by x_set_offset to determine whether the window
--
2.5.0
next prev parent reply other threads:[~2015-08-23 12:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-21 22:34 bug#21317: 25.0.50; frame-resize-pixelwise has no effect (GTK, no window manager) Pip Cet
2015-08-22 6:40 ` martin rudalics
2015-08-22 10:50 ` Pip Cet
2015-08-22 14:16 ` martin rudalics
2015-08-22 15:32 ` Pip Cet
2015-08-22 17:46 ` martin rudalics
2015-08-23 9:45 ` Pip Cet
2015-08-23 11:12 ` martin rudalics
2015-08-23 12:20 ` Pip Cet
2015-08-23 12:29 ` Pip Cet [this message]
2015-08-23 13:23 ` martin rudalics
2015-08-23 13:47 ` Pip Cet
2015-08-23 14:09 ` martin rudalics
2015-08-23 14:44 ` Pip Cet
2015-08-23 17:55 ` martin rudalics
2015-08-23 19:43 ` Pip Cet
2015-08-24 8:17 ` martin rudalics
2015-08-24 10:45 ` Pip Cet
2015-08-23 13:10 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOqdjBf172LNM4sLFbyhA54u5k0GF89+MEGFYa3ut5oOof0qvA@mail.gmail.com \
--to=pipcet@gmail.com \
--cc=21317@debbugs.gnu.org \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.