[gnome-shell] keyboard: Stop offsetting the focus rectangle



commit b160e44dab1260136d244e29eeb76508fa20d2d3
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Sat Feb 27 11:37:24 2021 +0100

    keyboard: Stop offsetting the focus rectangle
    
    The focus rectangle of the OSK currently gets stored with an offset that
    removes the global coordinates and makes it window-local coordinates.
    This offsetting has been applied since the introduction of the
    FocusTracker with commit fc5ab4470445992b1ad4338290deb24e6b1c5ce2 and it
    seems there's no real reason for it.
    
    By removing this, we also emit position-changed when the window has
    moved but the window-local coordinates stayed the same. We really want
    to emit position-changed in that case because it might affect whether
    the window needs to be shifted up.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1728>

 js/ui/keyboard.js | 8 --------
 1 file changed, 8 deletions(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 37b077d12b..43b4e5d27d 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -624,8 +624,6 @@ var FocusTracker = class {
             const rectInsideFrameRect = grapheneFrameRect.intersection(rect)[0];
             if (!rectInsideFrameRect)
                 return;
-
-            rect.offset(-frameRect.x, -frameRect.y);
         }
 
         if (this._rect && this._rect.equal(rect))
@@ -643,12 +641,6 @@ var FocusTracker = class {
             height: this._rect.size.height,
         };
 
-        if (this._currentWindow) {
-            let frameRect = this._currentWindow.get_frame_rect();
-            rect.x += frameRect.x;
-            rect.y += frameRect.y;
-        }
-
         return rect;
     }
 };


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]