summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-08-17 15:42:41 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-08-18 14:27:32 -0500
commit9df39b56163ab299153a987f1525ceb174b16273 (patch)
treef4fde0c51b7b781ec1bb6c0331ec4720f2dae0c0 /src/lib/ecore_wl2
parentf95f17ae37fe19359c1fb1a8fc691c3c4250e660 (diff)
ecore_wl2: Refactor out code to send window configure complete event
Diffstat (limited to 'src/lib/ecore_wl2')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c
index b0be628334..ee063dfee2 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -79,14 +79,10 @@ _ecore_wl2_window_deactivate_send(Ecore_Wl2_Window *window)
79} 79}
80 80
81static void 81static void
82_zxdg_surface_cb_configure(void *data, struct zxdg_surface_v6 *zxdg_surface EINA_UNUSED, uint32_t serial) 82_configure_complete(Ecore_Wl2_Window *window)
83{ 83{
84 Ecore_Wl2_Window *window;
85 Ecore_Wl2_Event_Window_Configure_Complete *ev; 84 Ecore_Wl2_Event_Window_Configure_Complete *ev;
86 85
87 window = data;
88 window->configure_serial = serial;
89 if (!window->pending.configure) return;
90 window->pending.configure = EINA_FALSE; 86 window->pending.configure = EINA_FALSE;
91 87
92 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Configure_Complete)); 88 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Configure_Complete));
@@ -94,6 +90,19 @@ _zxdg_surface_cb_configure(void *data, struct zxdg_surface_v6 *zxdg_surface EINA
94 90
95 ev->win = window->id; 91 ev->win = window->id;
96 ecore_event_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE, ev, NULL, NULL); 92 ecore_event_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE, ev, NULL, NULL);
93
94}
95
96static void
97_zxdg_surface_cb_configure(void *data, struct zxdg_surface_v6 *zxdg_surface EINA_UNUSED, uint32_t serial)
98{
99 Ecore_Wl2_Window *window;
100
101 window = data;
102 window->configure_serial = serial;
103 if (!window->pending.configure) return;
104
105 _configure_complete(window);
97} 106}
98 107
99static const struct zxdg_surface_v6_listener _zxdg_surface_listener = 108static const struct zxdg_surface_v6_listener _zxdg_surface_listener =