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 e418052b3d66f20cca5780f21f9c493a37f3d5af (commit) via c2924a18ba98b3241d9ae2b912f6889d5bafbb9c (commit) from 64f27b70dc6f1ae231c627ac30beda08aef45a7b (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/e418052b3d66f20cca5780f21f9c493a37f3d...
commit e418052b3d66f20cca5780f21f9c493a37f3d5af Author: Cyril Hrubis metan@ucw.cz Date: Wed May 9 01:04:39 2012 +0200
spiv: Show progress when window was resized.
diff --git a/demos/spiv/spiv.c b/demos/spiv/spiv.c index 06e507a..18cfabc 100644 --- a/demos/spiv/spiv.c +++ b/demos/spiv/spiv.c @@ -520,6 +520,8 @@ int main(int argc, char *argv[]) switch (ev.code) { case GP_EV_SYS_RESIZE: GP_BackendResize(backend, ev.val.sys.w, ev.val.sys.h); + GP_Fill(backend->context, 0); + params.show_progress_once = 1; show_image(¶ms); break; case GP_EV_SYS_QUIT:
http://repo.or.cz/w/gfxprim.git/commit/c2924a18ba98b3241d9ae2b912f6889d5bafb...
commit c2924a18ba98b3241d9ae2b912f6889d5bafbb9c Author: Cyril Hrubis metan@ucw.cz Date: Wed May 9 01:03:56 2012 +0200
backends: X11 ignore expose events until Update or Flip is called.
diff --git a/libs/backends/GP_X11.c b/libs/backends/GP_X11.c index fb95a52..02137bd 100644 --- a/libs/backends/GP_X11.c +++ b/libs/backends/GP_X11.c @@ -37,6 +37,8 @@ struct x11_priv { Window win; Visual *vis; XImage *img; + + int resized_flag; };
static void x11_exit(GP_Backend *self) @@ -70,6 +72,8 @@ static void x11_update_rect(GP_Backend *self, GP_Coord x0, GP_Coord y0, x11->img, x0, y0, x0, y0, x1-x0, y1-y0); XFlush(x11->dpy);
+ x11->resized_flag = 0; + XUnlockDisplay(x11->dpy); }
@@ -86,6 +90,8 @@ static void x11_flip(GP_Backend *self) XPutImage(x11->dpy, x11->win, DefaultGC(x11->dpy, x11->scr), x11->img, 0, 0, 0, 0, w, h); XFlush(x11->dpy); + + x11->resized_flag = 0;
XUnlockDisplay(x11->dpy); } @@ -106,6 +112,10 @@ static void x11_poll(GP_Backend *self) ev.xexpose.x, ev.xexpose.y, ev.xexpose.width, ev.xexpose.height, ev.xexpose.count); + + if (x11->resized_flag) + break; + x11_update_rect(self, ev.xexpose.x, ev.xexpose.y, ev.xexpose.x + ev.xexpose.width, ev.xexpose.y + ev.xexpose.height); @@ -170,6 +180,8 @@ static int x11_set_attributes(struct GP_Backend *self, /* Resize X11 window */ XResizeWindow(x11->dpy, x11->win, w, h); XFlush(x11->dpy); + + x11->resized_flag = 1; } XUnlockDisplay(x11->dpy); @@ -227,7 +239,7 @@ GP_Backend *GP_BackendX11Init(const char *display, int x, int y, GP_DEBUG(1, "Failed to create window"); goto err2; } - + /* Select events */ XSelectInput(x11->dpy, x11->win, ExposureMask | StructureNotifyMask | KeyPressMask | KeyReleaseMask | @@ -241,6 +253,9 @@ GP_Backend *GP_BackendX11Init(const char *display, int x, int y, /* Show window */ XMapWindow(x11->dpy, x11->win); XFlush(x11->dpy); + + x11->resized_flag = 0; +
/* enum GP_PixelType pixel_type; @@ -266,6 +281,7 @@ GP_Backend *GP_BackendX11Init(const char *display, int x, int y, backend->Poll = x11_poll; backend->SetAttributes = x11_set_attributes;
+ return backend; //err3: // XDestroyWindow(x11->dpy, x11->win);
-----------------------------------------------------------------------
Summary of changes: demos/spiv/spiv.c | 2 ++ libs/backends/GP_X11.c | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 1 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.