summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-05-11 15:36:45 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-05-11 15:40:10 -0400
commitd3ba524a62713ff58c1537524030c155d0713ca2 (patch)
treea01ad0978ac34e1490621d6b2960388a04e33738
parent45e872ddf19e82b92a30ff7085df439577c8d836 (diff)
use window id for internal window pixmaps again on wayland
this was breaking internal windows when more than one was open, and especially if any were open which had a parent-child relationship, by using the same id for all internal window pixmaps
-rw-r--r--src/bin/e_comp_wl.c6
-rw-r--r--src/bin/e_win.c18
2 files changed, 11 insertions, 13 deletions
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 1402ef872..0e032f247 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -1551,6 +1551,7 @@ _e_comp_wl_surface_destroy(struct wl_resource *resource)
1551 1551
1552 if (!(ec = wl_resource_get_user_data(resource))) return; 1552 if (!(ec = wl_resource_get_user_data(resource))) return;
1553 1553
1554 e_pixmap_alias(ec->pixmap, E_PIXMAP_TYPE_WL, wl_resource_get_id(resource));
1554 e_object_del(E_OBJECT(ec)); 1555 e_object_del(E_OBJECT(ec));
1555 evas_object_hide(ec->frame); 1556 evas_object_hide(ec->frame);
1556} 1557}
@@ -2256,7 +2257,10 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec)
2256 wl_resource_destroy(cb); 2257 wl_resource_destroy(cb);
2257 2258
2258 if (ec->comp_data->surface) 2259 if (ec->comp_data->surface)
2259 wl_resource_set_user_data(ec->comp_data->surface, NULL); 2260 {
2261 e_pixmap_alias(ec->pixmap, E_PIXMAP_TYPE_WL, wl_resource_get_id(ec->comp_data->surface));
2262 wl_resource_set_user_data(ec->comp_data->surface, NULL);
2263 }
2260 2264
2261 if (ec->internal_elm_win) 2265 if (ec->internal_elm_win)
2262 evas_object_hide(ec->frame); 2266 evas_object_hide(ec->frame);
diff --git a/src/bin/e_win.c b/src/bin/e_win.c
index 2e0ba1412..31667ebc9 100644
--- a/src/bin/e_win.c
+++ b/src/bin/e_win.c
@@ -73,7 +73,7 @@ _e_elm_win_trap_show(void *data, Evas_Object *o)
73 E_Client *ec; 73 E_Client *ec;
74 Ecore_Window win; 74 Ecore_Window win;
75#ifdef HAVE_WAYLAND 75#ifdef HAVE_WAYLAND
76 int64_t wl_win_id; 76 int64_t wl_win_id = -1;
77#endif 77#endif
78 E_Pixmap_Type type = E_PIXMAP_TYPE_X; 78 E_Pixmap_Type type = E_PIXMAP_TYPE_X;
79 79
@@ -96,12 +96,7 @@ _e_elm_win_trap_show(void *data, Evas_Object *o)
96 ctx->pointer = e_pointer_window_new(win, EINA_TRUE); 96 ctx->pointer = e_pointer_window_new(win, EINA_TRUE);
97 } 97 }
98 98
99#ifdef HAVE_WAYLAND 99 ec = e_pixmap_find_client(type, win);
100 if (type == E_PIXMAP_TYPE_WL)
101 ec = e_pixmap_find_client(type, wl_win_id);
102 else
103#endif
104 ec = e_pixmap_find_client(type, win);
105 if (ec) 100 if (ec)
106 ctx->client = ec; 101 ctx->client = ec;
107 else 102 else
@@ -118,13 +113,12 @@ _e_elm_win_trap_show(void *data, Evas_Object *o)
118 title = "E"; 113 title = "E";
119 ecore_evas_title_set(ee, title); 114 ecore_evas_title_set(ee, title);
120 115
116 cp = e_pixmap_new(type, win);
117 EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_TRUE);
121#ifdef HAVE_WAYLAND 118#ifdef HAVE_WAYLAND
122 if (type == E_PIXMAP_TYPE_WL) 119 if (wl_win_id >= 0)
123 cp = e_pixmap_new(type, wl_win_id); 120 e_pixmap_alias(cp, type, wl_win_id);
124 else
125#endif 121#endif
126 cp = e_pixmap_new(type, win);
127 EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_TRUE);
128 122
129 current_win = ctx; 123 current_win = ctx;
130 ctx->client = e_client_new(cp, 0, 1); 124 ctx->client = e_client_new(cp, 0, 1);