aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-01-04 14:23:52 -0500
committerChris Michael <cp.michael@samsung.com>2017-01-04 14:25:24 -0500
commit459a23244f8b81f2ef231b86ae44027d44cc27a8 (patch)
tree5a53529d46baf038d1fa2801c6c197d7432662ad /src
parentecore-evas-wayland: Support zxdg_shell version 6 configure_ack (diff)
downloadefl-459a23244f8b81f2ef231b86ae44027d44cc27a8.tar.gz
elementary: Support xdg_shell version 6 show_window_menu function
As we now support xdg_shell version 6 on the client-side, we need to use the zxdg_toplevel_v6 function call to show window menus. Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/efl_ui_win.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 4d2b945b10..3c7005d208 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -4007,16 +4007,23 @@ _elm_win_frame_cb_menu(void *data,
{
ELM_WIN_DATA_GET(data, sd);
#ifdef HAVE_ELEMENTARY_WL2
+ Ecore_Wl2_Input *input;
int x, y, wx, wy;
- if ((!sd->wl.win) || (!sd->wl.win->xdg_surface)) return;
+ if (!sd->wl.win) return;
evas_canvas_pointer_canvas_xy_get(sd->evas, &x, &y);
ecore_wl2_window_geometry_get(sd->wl.win, &wx, &wy, NULL, NULL);
if (x < 0) x += wx;
if (y < 0) y += wy;
- xdg_surface_show_window_menu(sd->wl.win->xdg_surface,
- ecore_wl2_input_seat_get(ecore_wl2_window_input_get(sd->wl.win)), 0,
- x, y);
+
+ input = ecore_wl2_window_input_get(sd->wl.win);
+
+ if (sd->wl.win->zxdg_toplevel)
+ zxdg_toplevel_v6_show_window_menu(sd->wl.win->zxdg_toplevel,
+ ecore_wl2_input_seat_get(input), 0, x, y);
+ else if (sd->wl.win->xdg_surface)
+ xdg_surface_show_window_menu(sd->wl.win->xdg_surface,
+ ecore_wl2_input_seat_get(input), 0, x, y);
#else
(void)sd;
#endif