[metacity/wip/invisible-borders: 19/25] Disable top resizing for attached modal dialogs, for real this time
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity/wip/invisible-borders: 19/25] Disable top resizing for attached modal dialogs, for real this time
- Date: Tue, 20 Jan 2015 13:14:09 +0000 (UTC)
commit a23ec34765d3dbee02dd07637d64df547a962844
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Sep 1 12:17:26 2011 -0400
Disable top resizing for attached modal dialogs, for real this time
https://bugzilla.gnome.org/show_bug.cgi?id=657795
With this fix applied:
https://git.gnome.org/browse/mutter/commit/?id=00e49b330c413dae96ba16b3ce2a1a6962b0f0df
src/ui/frames.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index b4a5e2c..c31e2e2 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -2742,6 +2742,7 @@ get_control (MetaFrames *frames,
MetaFrameFlags flags;
MetaFrameType type;
gboolean has_vert, has_horiz;
+ gboolean has_north_resize;
GdkRectangle client;
meta_frames_calc_geometry (frames, frame, &fgeom);
@@ -2767,12 +2768,13 @@ get_control (MetaFrames *frames,
META_CORE_GET_FRAME_TYPE, &type,
META_CORE_GET_END);
+ has_north_resize = (type != META_FRAME_TYPE_ATTACHED);
has_vert = (flags & META_FRAME_ALLOWS_VERTICAL_RESIZE) != 0;
has_horiz = (flags & META_FRAME_ALLOWS_HORIZONTAL_RESIZE) != 0;
if (POINT_IN_RECT (x, y, fgeom.title_rect))
{
- if (has_vert && y <= TOP_RESIZE_HEIGHT && (type != META_FRAME_TYPE_ATTACHED))
+ if (has_vert && y <= TOP_RESIZE_HEIGHT && has_north_resize)
return META_FRAME_CONTROL_RESIZE_N;
else
return META_FRAME_CONTROL_TITLE;
@@ -2841,7 +2843,7 @@ get_control (MetaFrames *frames,
return META_FRAME_CONTROL_RESIZE_W;
}
else if (y < (fgeom.borders.invisible.top + RESIZE_EXTENDS) &&
- x <= (fgeom.borders.total.left + RESIZE_EXTENDS))
+ x <= (fgeom.borders.total.left + RESIZE_EXTENDS) && has_north_resize)
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_NW;
@@ -2851,7 +2853,7 @@ get_control (MetaFrames *frames,
return META_FRAME_CONTROL_RESIZE_W;
}
else if (y < (fgeom.borders.invisible.top + RESIZE_EXTENDS) &&
- x >= (fgeom.width - fgeom.borders.total.right - RESIZE_EXTENDS))
+ x >= (fgeom.width - fgeom.borders.total.right - RESIZE_EXTENDS) && has_north_resize)
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_NE;
@@ -2862,7 +2864,7 @@ get_control (MetaFrames *frames,
}
else if (y < (fgeom.borders.invisible.top + TOP_RESIZE_HEIGHT))
{
- if (has_vert)
+ if (has_vert && has_north_resize)
return META_FRAME_CONTROL_RESIZE_N;
}
else if (y >= (fgeom.height - fgeom.borders.total.bottom - RESIZE_EXTENDS))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]