[metacity] frames: use new resize border



commit 5bcf7e10e31b4d5933812cb241d2d11de4c9d01a
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Jun 9 22:07:07 2016 +0300

    frames: use new resize border

 src/ui/frames.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 50bbf3e..af9fff0 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -2586,11 +2586,17 @@ get_control (MetaFrames *frames,
   gboolean has_vert, has_horiz;
   gboolean has_north_resize;
   GdkRectangle client;
+  MetaFrameBorders borders;
 
   meta_frames_calc_geometry (frames, frame, &fgeom);
   get_client_rect (&fgeom, fgeom.width, fgeom.height, &client);
 
-  if (x < 0 || y < 0 || x > fgeom.width || y > fgeom.height)
+  borders = fgeom.borders;
+
+  if (x < borders.invisible.left - borders.resize.left ||
+      y < borders.invisible.top - borders.resize.top ||
+      x > fgeom.width - borders.invisible.right + borders.resize.right ||
+      y > fgeom.height - borders.invisible.bottom + borders.resize.bottom)
     return META_FRAME_CONTROL_NONE;
 
   if (POINT_IN_RECT (x, y, client))


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