[mutter] frames: Disable the titlebar "inner resize"



commit d624e85bc180676c5cfd2d7c4c85ec458e333951
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Oct 4 20:00:59 2011 -0400

    frames: Disable the titlebar "inner resize"
    
    Since invisible draggable borders have been around, there isn't really a big
    need for this feature
    
    https://bugzilla.gnome.org/show_bug.cgi?id=660129

 src/ui/frames.c |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 96fcc38..1444c1e 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -2637,7 +2637,6 @@ control_rect (MetaFrameControl control,
   return rect;
 }
 
-#define RESIZE_EXTENDS 15
 #define TOP_RESIZE_HEIGHT 4
 static MetaFrameControl
 get_control (MetaFrames *frames,
@@ -2726,8 +2725,8 @@ get_control (MetaFrames *frames,
    * in case of overlap.
    */
 
-  if (y >= (fgeom.height - fgeom.borders.total.bottom - RESIZE_EXTENDS) &&
-      x >= (fgeom.width - fgeom.borders.total.right - RESIZE_EXTENDS))
+  if (y >= (fgeom.height - fgeom.borders.total.bottom) &&
+      x >= (fgeom.width - fgeom.borders.total.right))
     {
       if (has_vert && has_horiz)
         return META_FRAME_CONTROL_RESIZE_SE;
@@ -2736,8 +2735,8 @@ get_control (MetaFrames *frames,
       else if (has_horiz)
         return META_FRAME_CONTROL_RESIZE_E;
     }
-  else if (y >= (fgeom.height - fgeom.borders.total.bottom - RESIZE_EXTENDS) &&
-           x <= (fgeom.borders.total.left + RESIZE_EXTENDS))
+  else if (y >= (fgeom.height - fgeom.borders.total.bottom) &&
+           x <= fgeom.borders.total.left)
     {
       if (has_vert && has_horiz)
         return META_FRAME_CONTROL_RESIZE_SW;
@@ -2746,8 +2745,8 @@ get_control (MetaFrames *frames,
       else if (has_horiz)
         return META_FRAME_CONTROL_RESIZE_W;
     }
-  else if (y < (fgeom.borders.invisible.top + RESIZE_EXTENDS) &&
-           x <= (fgeom.borders.total.left + RESIZE_EXTENDS) && has_north_resize)
+  else if (y < (fgeom.borders.invisible.top) &&
+           x <= fgeom.borders.total.left && has_north_resize)
     {
       if (has_vert && has_horiz)
         return META_FRAME_CONTROL_RESIZE_NW;
@@ -2756,8 +2755,8 @@ get_control (MetaFrames *frames,
       else if (has_horiz)
         return META_FRAME_CONTROL_RESIZE_W;
     }
-  else if (y < (fgeom.borders.invisible.top + RESIZE_EXTENDS) &&
-           x >= (fgeom.width - fgeom.borders.total.right - RESIZE_EXTENDS) && has_north_resize)
+  else if (y < (fgeom.borders.invisible.top) &&
+           x >= fgeom.width - fgeom.borders.total.right && has_north_resize)
     {
       if (has_vert && has_horiz)
         return META_FRAME_CONTROL_RESIZE_NE;
@@ -2771,17 +2770,17 @@ get_control (MetaFrames *frames,
       if (has_vert && has_north_resize)
         return META_FRAME_CONTROL_RESIZE_N;
     }
-  else if (y >= (fgeom.height - fgeom.borders.total.bottom - RESIZE_EXTENDS))
+  else if (y >= (fgeom.height - fgeom.borders.total.bottom))
     {
       if (has_vert)
         return META_FRAME_CONTROL_RESIZE_S;
     }
-  else if (x <= fgeom.borders.total.left + RESIZE_EXTENDS)
+  else if (x <= fgeom.borders.total.left)
     {
       if (has_horiz)
         return META_FRAME_CONTROL_RESIZE_W;
     }
-  else if (x >= (fgeom.width - fgeom.borders.total.right - RESIZE_EXTENDS))
+  else if (x >= (fgeom.width - fgeom.borders.total.right))
     {
       if (has_horiz)
         return META_FRAME_CONTROL_RESIZE_E;



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