diff options
Diffstat (limited to 'src/ui/theme.c')
| -rw-r--r-- | src/ui/theme.c | 17 | 
1 files changed, 6 insertions, 11 deletions
| diff --git a/src/ui/theme.c b/src/ui/theme.c index 60b456a3..dadc9ab8 100644 --- a/src/ui/theme.c +++ b/src/ui/theme.c @@ -1003,17 +1003,12 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout  *layout,            rect->clickable.width = button_width;            rect->clickable.height = button_height; -          if (i == n_right - 1) +          /* For the last right button on maximized/right-tiled windows, extend clickable area to the top-right edge (Fitts's law)*/ +          if (i == n_right - 1 && (flags & META_FRAME_MAXIMIZED || flags & META_FRAME_TILED_RIGHT))              { -              /* Extend clickable area to the right edge */ +              rect->clickable.y = 0;                rect->clickable.width += layout->right_titlebar_edge + layout->right_width + layout->button_border.right; - -              /* For maximized and right-tiled windows, extend clickable area to the top edge (Fitts's law)*/ -              if (flags & META_FRAME_MAXIMIZED || flags & META_FRAME_TILED_RIGHT) -                { -                  rect->clickable.y = 0; -                  rect->clickable.height = button_y + button_height; -                } +              rect->clickable.height = button_y + button_height;              }          } @@ -1054,12 +1049,12 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout  *layout,            rect->clickable.width = button_width;            rect->clickable.height = button_height; -          /* For the first left button on maximized/left-tiled windows, extend to top-left corner (Fitts's law) */ +          /* For the first left button on maximized/left-tiled windows, extend clickable area to top-left corner (Fitts's law) */            if (i == 0 && (flags & META_FRAME_MAXIMIZED || flags & META_FRAME_TILED_LEFT))              {                rect->clickable.x = 0;                rect->clickable.y = 0; -              rect->clickable.width = rect->visible.x + button_width; +              rect->clickable.width += layout->left_titlebar_edge + layout->left_width + layout->button_border.left;                rect->clickable.height = button_y + button_height;              }          } | 
