aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/input/cursor.h
diff options
context:
space:
mode:
authorLibravatar Jonathan Buch <jbuch@synyx.de>2018-09-27 18:32:55 +0200
committerLibravatar Jonathan Buch <jbuch@synyx.de>2018-10-03 16:23:14 +0200
commit7727d54faf2939e30f82da562de83dbcda1749db (patch)
treef529d6896885f99d4551b6303c5d5f25a5c71508 /include/sway/input/cursor.h
parentAdd manpage documentatioon for raise_floating (diff)
downloadsway-7727d54faf2939e30f82da562de83dbcda1749db.tar.gz
sway-7727d54faf2939e30f82da562de83dbcda1749db.tar.zst
sway-7727d54faf2939e30f82da562de83dbcda1749db.zip
Fix focusing topmost floating windows
Re-focus on the container on which the cursor hovers over. A special case is, if there are menus or other subsurfaces open in the focused container. It will prefer the focused container as long as there are subsurfaces. This commit starts caching the previous node as well as the previous x/y cursor position. Re-calculating the previous focused node by looking at the current state of the cursor position does not work, if the environment changes.
Diffstat (limited to 'include/sway/input/cursor.h')
-rw-r--r--include/sway/input/cursor.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h
index 7ec45120..4d47ab42 100644
--- a/include/sway/input/cursor.h
+++ b/include/sway/input/cursor.h
@@ -10,6 +10,7 @@ struct sway_cursor {
10 struct wlr_cursor *cursor; 10 struct wlr_cursor *cursor;
11 struct { 11 struct {
12 double x, y; 12 double x, y;
13 struct sway_node *node;
13 } previous; 14 } previous;
14 struct wlr_xcursor_manager *xcursor_manager; 15 struct wlr_xcursor_manager *xcursor_manager;
15 16