summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2008-11-03 11:42:01 -0500
committerKristian Høgsberg <krh@redhat.com>2008-11-06 10:53:02 -0500
commit35370f80735d2a8926aadd081b2ca9a0367cc557 (patch)
tree404348a95a02fdcaf14dbb29ae927fe9e5d9c7b0
parent2d9cd1ee5146fab1ed2aaedaea9a6408c9b78678 (diff)
downloadweston-35370f80735d2a8926aadd081b2ca9a0367cc557.tar.gz
weston-35370f80735d2a8926aadd081b2ca9a0367cc557.tar.bz2
weston-35370f80735d2a8926aadd081b2ca9a0367cc557.zip
Redraw window in idle handler.
-rw-r--r--window.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/window.c b/window.c
index 9e419d0d..0067488c 100644
--- a/window.c
+++ b/window.c
@@ -74,6 +74,7 @@ struct window {
int state;
uint32_t name;
int fd;
+ int need_redraw;
};
static void *
@@ -185,7 +186,7 @@ void event_handler(struct wl_display *display,
case WINDOW_RESIZING_LOWER_RIGHT:
window->width = window->drag_x + arg1;
window->height = window->drag_y + arg2;
- draw_window(window);
+ window->need_redraw = 1;
break;
}
}
@@ -268,6 +269,10 @@ int main(int argc, char *argv[])
mask |= WL_CONNECTION_WRITABLE;
if (mask)
wl_display_iterate(display, mask);
+ if (window.need_redraw) {
+ draw_window(&window);
+ window.need_redraw = 0;
+ }
}
return 0;