summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-09-11 14:07:06 +0100
committerChris Michael <cp.michael@samsung.com>2013-09-11 14:10:27 +0100
commitdc0122285879bd784dfd218daa7b2422b5a19f28 (patch)
tree08c2ca2d660aba84a81960c095927e9adee773bd
parentd673cbc3982399a11be74a42f909e68b0f380dea (diff)
Add back saving of opaque region into window structure.
NB: Needed so that we can reset the opaque region if alpha_set is being toggled on/off all the time. Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/ecore_wayland/Ecore_Wayland.h5
-rw-r--r--src/lib/ecore_wayland/ecore_wl_window.c13
2 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/ecore_wayland/Ecore_Wayland.h b/src/lib/ecore_wayland/Ecore_Wayland.h
index c43ae49ea3..cb5f24933e 100644
--- a/src/lib/ecore_wayland/Ecore_Wayland.h
+++ b/src/lib/ecore_wayland/Ecore_Wayland.h
@@ -222,6 +222,11 @@ struct _Ecore_Wl_Window
222 int w, h; 222 int w, h;
223 } saved, server; 223 } saved, server;
224 224
225 struct
226 {
227 int x, y, w, h;
228 } opaque;
229
225 /* Eina_Bool redraw_scheduled : 1; */ 230 /* Eina_Bool redraw_scheduled : 1; */
226 /* Eina_Bool resize_scheduled : 1; */ 231 /* Eina_Bool resize_scheduled : 1; */
227 Eina_Bool alpha : 1; 232 Eina_Bool alpha : 1;
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c
index ea59ec4e2a..5f8b958ab5 100644
--- a/src/lib/ecore_wayland/ecore_wl_window.c
+++ b/src/lib/ecore_wayland/ecore_wl_window.c
@@ -80,6 +80,11 @@ ecore_wl_window_new(Ecore_Wl_Window *parent, int x, int y, int w, int h, int buf
80 win->buffer_type = buffer_type; 80 win->buffer_type = buffer_type;
81 win->id = _win_id++; 81 win->id = _win_id++;
82 82
83 win->opaque.x = x;
84 win->opaque.y = y;
85 win->opaque.w = w;
86 win->opaque.h = h;
87
83 eina_hash_add(_windows, _ecore_wl_window_id_str_get(win->id), win); 88 eina_hash_add(_windows, _ecore_wl_window_id_str_get(win->id), win);
84 return win; 89 return win;
85} 90}
@@ -435,6 +440,9 @@ ecore_wl_window_alpha_set(Ecore_Wl_Window *win, Eina_Bool alpha)
435 win->alpha = alpha; 440 win->alpha = alpha;
436 if (win->alpha) 441 if (win->alpha)
437 ecore_wl_window_opaque_region_set(win, 0, 0, 0, 0); 442 ecore_wl_window_opaque_region_set(win, 0, 0, 0, 0);
443 else
444 ecore_wl_window_opaque_region_set(win, win->opaque.x, win->opaque.y,
445 win->opaque.w, win->opaque.h);
438} 446}
439 447
440EAPI Eina_Bool 448EAPI Eina_Bool
@@ -629,6 +637,11 @@ ecore_wl_window_opaque_region_set(Ecore_Wl_Window *win, int x, int y, int w, int
629 wl_region_add(region, x, y, w, h); 637 wl_region_add(region, x, y, w, h);
630 wl_surface_set_opaque_region(win->surface, region); 638 wl_surface_set_opaque_region(win->surface, region);
631 wl_region_destroy(region); 639 wl_region_destroy(region);
640
641 win->opaque.x = x;
642 win->opaque.y = y;
643 win->opaque.w = w;
644 win->opaque.h = h;
632 } 645 }
633 else 646 else
634 wl_surface_set_opaque_region(win->surface, NULL); 647 wl_surface_set_opaque_region(win->surface, NULL);