summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-01-20 15:55:10 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-02-02 13:34:48 -0500
commit317f0794d62f030f6fb4e74e11b958cf15df47c7 (patch)
tree0c7fa03aa3d8691ab58d6aab78c749d014dc6c6d
parentf129b0d7d5698e1220a13d895964fc7dd82691e4 (diff)
automatically mark wayland cursor surfaces as visible during set_cursor
a cursor client should be shown/hidden as needed despite its lack of a shell interface, and having a special flag to identify these types of surfaces makes it easier to do that
-rw-r--r--src/bin/e_comp_wl.c8
-rw-r--r--src/bin/e_comp_wl.h1
-rw-r--r--src/bin/e_comp_wl_input.c4
3 files changed, 8 insertions, 5 deletions
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index a7dc24deb..09ec7a45c 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -1070,7 +1070,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
1070 { 1070 {
1071 if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap)) 1071 if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap))
1072 ec->comp_data->shell.unmap(ec->comp_data->shell.surface); 1072 ec->comp_data->shell.unmap(ec->comp_data->shell.surface);
1073 else if (e_client_has_xwindow(ec)) 1073 else if (ec->comp_data->cursor || e_client_has_xwindow(ec))
1074 { 1074 {
1075 ec->visible = EINA_FALSE; 1075 ec->visible = EINA_FALSE;
1076 evas_object_hide(ec->frame); 1076 evas_object_hide(ec->frame);
@@ -1084,7 +1084,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
1084 { 1084 {
1085 if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map)) 1085 if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map))
1086 ec->comp_data->shell.map(ec->comp_data->shell.surface); 1086 ec->comp_data->shell.map(ec->comp_data->shell.surface);
1087 else if (e_client_has_xwindow(ec)) 1087 else if (ec->comp_data->cursor || e_client_has_xwindow(ec))
1088 { 1088 {
1089 ec->visible = EINA_TRUE; 1089 ec->visible = EINA_TRUE;
1090 ec->ignored = 0; 1090 ec->ignored = 0;
@@ -2758,7 +2758,7 @@ e_comp_wl_surface_commit(E_Client *ec)
2758 { 2758 {
2759 if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap)) 2759 if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap))
2760 ec->comp_data->shell.unmap(ec->comp_data->shell.surface); 2760 ec->comp_data->shell.unmap(ec->comp_data->shell.surface);
2761 else if (e_client_has_xwindow(ec)) 2761 else if (ec->comp_data->cursor || e_client_has_xwindow(ec))
2762 { 2762 {
2763 ec->visible = EINA_FALSE; 2763 ec->visible = EINA_FALSE;
2764 evas_object_hide(ec->frame); 2764 evas_object_hide(ec->frame);
@@ -2772,7 +2772,7 @@ e_comp_wl_surface_commit(E_Client *ec)
2772 { 2772 {
2773 if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map)) 2773 if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map))
2774 ec->comp_data->shell.map(ec->comp_data->shell.surface); 2774 ec->comp_data->shell.map(ec->comp_data->shell.surface);
2775 else if (e_client_has_xwindow(ec)) 2775 else if (ec->comp_data->cursor || e_client_has_xwindow(ec))
2776 { 2776 {
2777 ec->visible = EINA_TRUE; 2777 ec->visible = EINA_TRUE;
2778 ec->ignored = 0; 2778 ec->ignored = 0;
diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h
index a4426e174..d280eb387 100644
--- a/src/bin/e_comp_wl.h
+++ b/src/bin/e_comp_wl.h
@@ -300,6 +300,7 @@ struct _E_Comp_Wl_Client_Data
300 Eina_Bool set_win_type : 1; 300 Eina_Bool set_win_type : 1;
301 Eina_Bool frame_update : 1; 301 Eina_Bool frame_update : 1;
302 Eina_Bool maximize_pre : 1; 302 Eina_Bool maximize_pre : 1;
303 Eina_Bool cursor : 1;
303}; 304};
304 305
305struct _E_Comp_Wl_Output 306struct _E_Comp_Wl_Output
diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c
index ec9d2e140..b07ad7655 100644
--- a/src/bin/e_comp_wl_input.c
+++ b/src/bin/e_comp_wl_input.c
@@ -55,12 +55,14 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou
55 ec = wl_resource_get_user_data(surface_resource); 55 ec = wl_resource_get_user_data(surface_resource);
56 if (!ec->re_manage) 56 if (!ec->re_manage)
57 { 57 {
58 ec->re_manage = 1; 58 ec->comp_data->cursor = ec->re_manage = 1;
59 ec->ignored = 0; 59 ec->ignored = 0;
60 60
61 ec->lock_focus_out = ec->layer_block = ec->visible = ec->override = 1; 61 ec->lock_focus_out = ec->layer_block = ec->visible = ec->override = 1;
62 ec->icccm.title = eina_stringshare_add("noshadow"); 62 ec->icccm.title = eina_stringshare_add("noshadow");
63 evas_object_pass_events_set(ec->frame, 1); 63 evas_object_pass_events_set(ec->frame, 1);
64 evas_object_show(ec->frame);
65 ec->comp_data->mapped = 1;
64 e_client_focus_stack_set(eina_list_remove(e_client_focus_stack_get(), ec)); 66 e_client_focus_stack_set(eina_list_remove(e_client_focus_stack_get(), ec));
65 EC_CHANGED(ec); 67 EC_CHANGED(ec);
66 } 68 }