summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Wu <zhiwen.wu@linux.intel.com>2013-01-08 07:21:47 +0000
committerChristopher Michael <cpmichael1@comcast.net>2013-01-08 07:21:47 +0000
commit41308aa72918b9b46f0aedfff052c47fe3585bba (patch)
treea7ef5acf2a2dbcc3cb2cff0f9649b69533f59979 /src
parent67769cc39fed35080fe8c145ba7a9635124f77b9 (diff)
From: Alex Wu <zhiwen.wu@linux.intel.com>
Date: Sat, 5 Jan 2013 10:50:19 +0800 Subject: [PATCH] ecore-wayland: Improve opaque setting logic. 1. Update win->region.opaque in ecore_wl_window_update_size, so that the opaque info is synced with the geometry. 2. Add win->surface checking in ecore_wl_window_buffer_attach before send any wl_surface related request, it will avoid segfault in case that calling ecore_wl_window_buffer_attach() before ecore_wl_window_show(). Signed-off-by: Christopher Michael <cp.michael@samsung.com> SVN revision: 82385
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore_wayland/ecore_wl_window.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c
index f20b3c693a..3ba06d8124 100644
--- a/src/lib/ecore_wayland/ecore_wl_window.c
+++ b/src/lib/ecore_wayland/ecore_wl_window.c
@@ -241,8 +241,7 @@ ecore_wl_window_buffer_attach(Ecore_Wl_Window *win, struct wl_buffer *buffer, in
241 return; 241 return;
242 } 242 }
243 243
244 if (!win->surface) 244 if (!win->surface) return;
245 return;
246 245
247 if (win->region.input) 246 if (win->region.input)
248 { 247 {
@@ -425,7 +424,7 @@ ecore_wl_window_update_size(Ecore_Wl_Window *win, int w, int h)
425 win->allocation.w = w; 424 win->allocation.w = w;
426 win->allocation.h = h; 425 win->allocation.h = h;
427 426
428 if (!win->transparent || !win->alpha) 427 if ((!win->transparent) || (!win->alpha))
429 { 428 {
430 if (win->region.opaque) wl_region_destroy(win->region.opaque); 429 if (win->region.opaque) wl_region_destroy(win->region.opaque);
431 win->region.opaque = 430 win->region.opaque =