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 88eea356e8494dea8645470506f2087b104d4326 (commit)
via 6bc4c8d0ca2ac207dc2a0e2feb9fd482aeff1343 (commit)
from 117f44cf3323cab17798651ccdedc9018e5a95fc (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/88eea356e8494dea8645470506f2087b104d…
commit 88eea356e8494dea8645470506f2087b104d4326
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Tue Nov 12 23:43:45 2013 +0100
backends: X11: Flush connection when window was closed.
If one of the windows was closed the connection needs
to be flushed so that it's removed from the screen immediately.
Signed-off-by: Cyril Hrubis <metan(a)ucw.cz>
diff --git a/libs/backends/GP_X11_Win.h b/libs/backends/GP_X11_Win.h
index ad0bbf5..1a81fc5 100644
--- a/libs/backends/GP_X11_Win.h
+++ b/libs/backends/GP_X11_Win.h
@@ -90,6 +90,11 @@ static struct x11_win *win_list_lookup(Window win)
return NULL;
}
+static int win_list_empty(void)
+{
+ return win_list == NULL;
+}
+
/* Send NETWM message, most modern Window Managers should understand */
static void x11_win_fullscreen(struct x11_win *win, int mode)
{
@@ -379,6 +384,9 @@ static void x11_win_close(struct x11_win *win)
XDestroyWindow(win->dpy, win->win);
+ if (!win_list_empty())
+ XFlush(win->dpy);
+
XUnlockDisplay(win->dpy);
/* Close connection/Decrease ref count */
http://repo.or.cz/w/gfxprim.git/commit/6bc4c8d0ca2ac207dc2a0e2feb9fd482aeff…
commit 6bc4c8d0ca2ac207dc2a0e2feb9fd482aeff1343
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Tue Nov 12 23:41:40 2013 +0100
backends: X11: Avoid dereferencing closed window
If X11 backend has two windows opened and one of them
was closed the pointer to last window in event parser may
became invalid. Now it's cleared when window is closed.
Signed-off-by: Cyril Hrubis <metan(a)ucw.cz>
diff --git a/libs/backends/GP_X11.c b/libs/backends/GP_X11.c
index 5b64b49..ffa0b9c 100644
--- a/libs/backends/GP_X11.c
+++ b/libs/backends/GP_X11.c
@@ -105,20 +105,24 @@ static void x11_flip(GP_Backend *self)
XUnlockDisplay(win->dpy);
}
+static struct x11_win *last_win = NULL;
+
static void x11_ev(XEvent *ev)
{
- static struct x11_win *win = NULL;
+ struct x11_win *win;
/* Lookup for window */
- if (win == NULL || win->win != ev->xany.window) {
- win = win_list_lookup(ev->xany.window);
+ if (last_win == NULL || last_win->win != ev->xany.window) {
+ last_win = win_list_lookup(ev->xany.window);
- if (win == NULL) {
+ if (last_win == NULL) {
GP_WARN("Event for unknown window, ignoring.");
return;
}
}
+ win = last_win;
+
struct GP_Backend *self = GP_CONTAINER_OF(win, struct GP_Backend, priv);
switch (ev->type) {
@@ -546,6 +550,13 @@ static void window_close(GP_Backend *self)
static void x11_exit(GP_Backend *self)
{
+ struct x11_win *win = GP_BACKEND_PRIV(self);
+
+ GP_DEBUG(1, "Closing window %p", win);
+
+ if (win == last_win)
+ last_win = NULL;
+
window_close(self);
free(self);
diff --git a/libs/backends/GP_X11_Win.h b/libs/backends/GP_X11_Win.h
index b728bcf..ad0bbf5 100644
--- a/libs/backends/GP_X11_Win.h
+++ b/libs/backends/GP_X11_Win.h
@@ -363,6 +363,8 @@ static int x11_win_open(struct x11_wreq *wreq)
static void x11_win_close(struct x11_win *win)
{
+ GP_DEBUG(1, "Closing window");
+
XLockDisplay(win->dpy);
win_list_rem(win);
-----------------------------------------------------------------------
Summary of changes:
libs/backends/GP_X11.c | 19 +++++++++++++++----
libs/backends/GP_X11_Win.h | 10 ++++++++++
2 files changed, 25 insertions(+), 4 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")
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 117f44cf3323cab17798651ccdedc9018e5a95fc (commit)
from 561ab88b80e943a571fa0aa84b3ed0816e6812eb (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/117f44cf3323cab17798651ccdedc9018e5a…
commit 117f44cf3323cab17798651ccdedc9018e5a95fc
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Tue Nov 12 22:54:47 2013 +0100
backends: X11: Warn if _NET_WM_STATE is not supported.
Print warning and don't send the client message in case NetWM window
fullscreen state is not supported.
Signed-off-by: Cyril Hrubis <metan(a)ucw.cz>
diff --git a/libs/backends/GP_X11_Win.h b/libs/backends/GP_X11_Win.h
index 8466961..b728bcf 100644
--- a/libs/backends/GP_X11_Win.h
+++ b/libs/backends/GP_X11_Win.h
@@ -100,6 +100,11 @@ static void x11_win_fullscreen(struct x11_win *win, int mode)
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);
memset(&ev, 0, sizeof(ev));
-----------------------------------------------------------------------
Summary of changes:
libs/backends/GP_X11_Win.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")
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 378721e46cdafc7ba99e30f51b8b8395fb254de0 (commit)
from 5d9d976eb5371267bad2e285f6de5f02712ce86b (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/378721e46cdafc7ba99e30f51b8b8395fb25…
commit 378721e46cdafc7ba99e30f51b8b8395fb254de0
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Mon Nov 11 22:54:02 2013 +0100
backends: X11: Fix window size passed to event parser.
When SHM is not in use, the win->context field is not used to construct
the backend context and the width and height fields are uninitialized
which leads to wrong (or none) events from mouse pointer movement.
Fix this by using self->context which is correct in all cases.
Signed-off-by: Cyril Hrubis <metan(a)ucw.cz>
diff --git a/libs/backends/GP_X11.c b/libs/backends/GP_X11.c
index 8505edc..3379dd0 100644
--- a/libs/backends/GP_X11.c
+++ b/libs/backends/GP_X11.c
@@ -167,7 +167,7 @@ static void x11_ev(XEvent *ev)
default:
//TODO: More accurate window w and h?
GP_InputDriverX11EventPut(&self->event_queue, ev,
- win->context.w, win->context.h);
+ self->context->w, self->context->h);
break;
}
}
@@ -480,7 +480,6 @@ static int create_ximage(GP_Backend *self, GP_Size w, GP_Size h)
}
win->shm_flag = 0;
-
win->img->data = (char*)self->context->pixels;
return 0;
-----------------------------------------------------------------------
Summary of changes:
libs/backends/GP_X11.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")