]> git.tdb.fi Git - libs/gltk.git/commitdiff
Do not navigate out of a widget holding the pointer grab
authorMikko Rasa <tdb@tdb.fi>
Mon, 16 Sep 2019 16:32:26 +0000 (19:32 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 16 Sep 2019 16:33:24 +0000 (19:33 +0300)
source/panel.cpp

index b9ddbf18b969d757bff20b2ca5a551bb1c3af869..a9d581f5aae63a11150df2b2fd3ebcba81d6f624 100644 (file)
@@ -84,6 +84,9 @@ bool Panel::navigate(Navigation nav)
                        origin_dim = abs(nav_x)*geom.h+abs(nav_y)*geom.w;
                }
 
+               if(pointer_grabbed && pointer_focus==input_focus)
+                       return false;
+
                Widget *sibling = find_next_child(origin_x, origin_y, origin_dim, nav_x, nav_y);
                if(!sibling && input_focus)
                {