]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't keep focus when hovering over non-focusable elements; it fixes scrolling with...
authorterencehill <piuntn@gmail.com>
Tue, 20 Feb 2018 18:16:20 +0000 (19:16 +0100)
committerterencehill <piuntn@gmail.com>
Tue, 20 Feb 2018 18:16:20 +0000 (19:16 +0100)
qcsrc/menu/item/container.qc
qcsrc/menu/item/inputcontainer.qc

index 04e1bc6f7cf20f754a88741cbe9ed003e42495a9..329ddf0f6e201c880a09883f0fdc3af296e78dce 100644 (file)
                                me.focusedChild.focused = 1;
                                me.focusedChild.focusEnter(me.focusedChild);
 
-                               if (me.focusedChild.instanceOfContainer) me.focusedChild.setFocus(me.focusedChild, me.focusedChild.savedFocus);
+                               if (me.focusedChild.instanceOfContainer)
+                                       me.focusedChild.setFocus(me.focusedChild, me.focusedChild.savedFocus);
                        }
                        else
                        {
index 641e47745a11f804e6ed47e4567ac2673ba539c7..cda342677262206dd8afb2bcdb011f136ed2edc9 100644 (file)
                if (e && !e.focusable) e = NULL;
                entity prev = this.mouseFocusedChild;
                this.mouseFocusedChild = e;
-               if (!e) return false;  // keep focus when hovering over non-focusable elements
                if (e != prev)
                {
                        this.setFocus(this, e);
-                       if (e.instanceOfInputContainer)
+                       if (e && e.instanceOfInputContainer)
                        {
                                e.focusedChild = NULL;
                                e._changeFocusXY(e, globalToBox(pos, e.Container_origin, e.Container_size));