cairo-util: Don't show a resize cursor on edges when we're maximized
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 28 Apr 2014 15:19:30 +0000 (11:19 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 1 May 2014 04:02:37 +0000 (21:02 -0700)
This is substantially confusing to users, namely me.

krh: Edited to just set grip size to zero.

shared/cairo-util.c

index a1568ff..2a33249 100644 (file)
@@ -488,10 +488,15 @@ theme_get_location(struct theme *t, int x, int y,
                                int width, int height, int flags)
 {
        int vlocation, hlocation, location;
-       const int grip_size = 8;
-       int margin, top_margin;
+       int margin, top_margin, grip_size;
 
-       margin = (flags & THEME_FRAME_MAXIMIZED) ? 0 : t->margin;
+       if (flags & THEME_FRAME_MAXIMIZED) {
+               margin = 0;
+               grip_size = 0;
+       } else {
+               margin = t->margin;
+               grip_size = 8;
+       }
 
        if (flags & THEME_FRAME_NO_TITLE)
                top_margin = t->width;