devilhorns pushed a commit to branch master.
commit dc0122285879bd784dfd218daa7b2422b5a19f28
Author: Chris Michael <[email protected]>
Date: Wed Sep 11 14:07:06 2013 +0100
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 <[email protected]>
---
src/lib/ecore_wayland/Ecore_Wayland.h | 5 +++++
src/lib/ecore_wayland/ecore_wl_window.c | 13 +++++++++++++
2 files changed, 18 insertions(+)
diff --git a/src/lib/ecore_wayland/Ecore_Wayland.h
b/src/lib/ecore_wayland/Ecore_Wayland.h
index c43ae49..cb5f249 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
int w, h;
} saved, server;
+ struct
+ {
+ int x, y, w, h;
+ } opaque;
+
/* Eina_Bool redraw_scheduled : 1; */
/* Eina_Bool resize_scheduled : 1; */
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 ea59ec4..5f8b958 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
win->buffer_type = buffer_type;
win->id = _win_id++;
+ win->opaque.x = x;
+ win->opaque.y = y;
+ win->opaque.w = w;
+ win->opaque.h = h;
+
eina_hash_add(_windows, _ecore_wl_window_id_str_get(win->id), win);
return win;
}
@@ -435,6 +440,9 @@ ecore_wl_window_alpha_set(Ecore_Wl_Window *win, Eina_Bool
alpha)
win->alpha = alpha;
if (win->alpha)
ecore_wl_window_opaque_region_set(win, 0, 0, 0, 0);
+ else
+ ecore_wl_window_opaque_region_set(win, win->opaque.x, win->opaque.y,
+ win->opaque.w, win->opaque.h);
}
EAPI Eina_Bool
@@ -629,6 +637,11 @@ ecore_wl_window_opaque_region_set(Ecore_Wl_Window *win,
int x, int y, int w, int
wl_region_add(region, x, y, w, h);
wl_surface_set_opaque_region(win->surface, region);
wl_region_destroy(region);
+
+ win->opaque.x = x;
+ win->opaque.y = y;
+ win->opaque.w = w;
+ win->opaque.h = h;
}
else
wl_surface_set_opaque_region(win->surface, NULL);
--
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk