summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2014-05-06 13:37:53 +0900
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2014-05-06 13:37:53 +0900
commite2102cdbffd64fb0f383b2b60008d5353bbbe8d4 (patch)
tree7c5a2721e3a6ffd9629ee673a638af257b761941 /shared
parent2991da5687fa2828d551fd7b2388d9648a19ecc2 (diff)
downloadweston-e2102cdbffd64fb0f383b2b60008d5353bbbe8d4.tar.gz
weston 1.4.92
Diffstat (limited to 'shared')
-rw-r--r--shared/cairo-util.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/shared/cairo-util.c b/shared/cairo-util.c
index 39485729..2a332490 100644
--- a/shared/cairo-util.c
+++ b/shared/cairo-util.c
@@ -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;
@@ -500,7 +505,7 @@ theme_get_location(struct theme *t, int x, int y,
if (x < margin)
hlocation = THEME_LOCATION_EXTERIOR;
- else if (margin <= x && x < margin + grip_size)
+ else if (x < margin + grip_size)
hlocation = THEME_LOCATION_RESIZING_LEFT;
else if (x < width - margin - grip_size)
hlocation = THEME_LOCATION_INTERIOR;
@@ -511,7 +516,7 @@ theme_get_location(struct theme *t, int x, int y,
if (y < margin)
vlocation = THEME_LOCATION_EXTERIOR;
- else if (margin <= y && y < margin + grip_size)
+ else if (y < margin + grip_size)
vlocation = THEME_LOCATION_RESIZING_TOP;
else if (y < height - margin - grip_size)
vlocation = THEME_LOCATION_INTERIOR;