aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-04-04 13:50:43 -0500
committerDerek Foreman <derekf@osg.samsung.com>2018-04-04 15:31:05 -0500
commit2ec16fbf3239f91f05882ca0b4f3bc18a92bd431 (patch)
tree7957eac6b21a916e0a3b2341cd14c6a7c2d4b29a /src/lib/elementary/efl_ui_win.c
parentefl_ui_focus_manager_root_focus: refactor _state_eval (diff)
downloadefl-2ec16fbf3239f91f05882ca0b4f3bc18a92bd431.tar.gz
elm_win: Improve wayland cursor change race
When changing cursors under wayland sometimes we'll see the old cursor moved to the new hotspot briefly before the cursor changes. This makes that suck less often. A proper fix would involve creating a new wayland surface for every cursor change (actual change, not just a new frame of an animated cursor). Given the current internals this is invasive. Do the easy thing for now.
Diffstat (limited to 'src/lib/elementary/efl_ui_win.c')
-rw-r--r--src/lib/elementary/efl_ui_win.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index ebe7224e77..6fe7c16fc6 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -3196,6 +3196,18 @@ _elm_win_wl_cursor_set(Evas_Object *obj, const char *cursor)
Ecore_Wl2_Input *input;
Eina_Iterator *it;
+ /* FIXME: Here be dragons...
+ pointer_set_cursor is totally unsynchronized, and on a cursor
+ change we get here before the new cursor is rendered. So
+ the cursor frequently moves to its new hotspot with the old
+ cursor image, causing an ugly jump.
+ Forcing manual render causes us to render first then set the
+ cursor, which is still racey but far more likely to win the
+ race.
+ The right way to do this is to create an entirely new surface
+ on every cursor change.
+ */
+ ecore_evas_manual_render(sd->pointer.ee);
it = ecore_wl2_display_inputs_get(ecore_wl2_window_display_get(sd->wl.win));
EINA_ITERATOR_FOREACH(it, input)
ecore_wl2_input_pointer_set(input, sd->pointer.surf, sd->pointer.hot_x, sd->pointer.hot_y);