This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 98c0bddd4c211b197d0186f2fcb7db48d3a46ace (commit) from e9b780c9bbc1f2717fec705a0b2b5dff22d7845b (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/98c0bddd4c211b197d0186f2fcb7db48d3a46...
commit 98c0bddd4c211b197d0186f2fcb7db48d3a46ace Author: Cyril Hrubis metan@ucw.cz Date: Wed Nov 13 23:20:49 2013 +0100
backends: X11: Ignore Win Resize request in FullScreen
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/libs/backends/GP_X11.c b/libs/backends/GP_X11.c index ffa0b9c..b938db4 100644 --- a/libs/backends/GP_X11.c +++ b/libs/backends/GP_X11.c @@ -229,14 +229,18 @@ static int x11_set_attributes(struct GP_Backend *self, }
if (w != 0 && h != 0) { + if (win->fullscreen_flag) { + GP_DEBUG(1, "Ignoring resize request in fullscreen"); + goto out; + } GP_DEBUG(3, "Setting window size to %ux%u", w, h); XResizeWindow(win->dpy, win->win, w, h); }
XFlush(win->dpy);
+out: XUnlockDisplay(win->dpy); - return 0; }
diff --git a/libs/backends/GP_X11_Win.h b/libs/backends/GP_X11_Win.h index 1a81fc5..2fc3098 100644 --- a/libs/backends/GP_X11_Win.h +++ b/libs/backends/GP_X11_Win.h @@ -51,6 +51,7 @@ struct x11_win { /* Flags */ int resized_flag:1; int shm_flag:1; + int fullscreen_flag:1;
/* used to store width and height from ConfigureNotify event */ unsigned int new_w; @@ -95,22 +96,48 @@ static int win_list_empty(void) return win_list == NULL; }
+#ifndef _NET_WM_STATE_REMOVE +# define _NET_WM_STATE_REMOVE 0 +#endif + +#ifndef _NET_WM_STATE_ADD +# define _NET_WM_STATE_ADD 1 +#endif + +#ifndef _NET_WM_STATE_TOGGLE +# define _NET_WM_STATE_TOGGLE 2 +#endif + /* Send NETWM message, most modern Window Managers should understand */ static void x11_win_fullscreen(struct x11_win *win, int mode) { + int fs; XEvent ev;
- if (mode < 0 || mode > 2) { + switch (mode) { + case _NET_WM_STATE_REMOVE: + fs = 0; + break; + case _NET_WM_STATE_ADD: + fs = 1; + break; + case _NET_WM_STATE_TOGGLE: + fs = !win->fullscreen_flag; + break; + default: GP_WARN("Invalid fullscreen mode = %u", mode); return; }
+ if (fs == win->fullscreen_flag) + return; + if (!x11_conn.S__NET_WM_STATE || !x11_conn.S__NET_WM_STATE_FULLSCREEN) { GP_WARN("NetWM Fullscreen not supported"); return; }
- GP_DEBUG(2, "Requesting fullscreen mode = %u", mode); + GP_DEBUG(2, "Requesting fullscreen mode = %u, fs = %i", mode, fs);
memset(&ev, 0, sizeof(ev));
@@ -129,6 +156,8 @@ static void x11_win_fullscreen(struct x11_win *win, int mode) return; }
+ win->fullscreen_flag = fs; + XFlush(win->dpy); }
@@ -169,6 +198,8 @@ static int x11_win_open(struct x11_wreq *wreq)
win = wreq->win;
+ win->fullscreen_flag = 0; + /* Copy display */ win->dpy = x11_conn.dpy;
-----------------------------------------------------------------------
Summary of changes: libs/backends/GP_X11.c | 6 +++++- libs/backends/GP_X11_Win.h | 35 +++++++++++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 3 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.