summaryrefslogtreecommitdiff
path: root/src/frames.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-01-19 23:59:11 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-01-19 23:59:11 +0000
commit5fdb8463def40bdfa208ecfdd4655209c35e0b2b (patch)
treed3511fd6c884150d0576b37f83f4ebdacfcdd630 /src/frames.c
parent19d2e8c7e1df6fcf12e5e5dcfe36430627eb8cc2 (diff)
downloadmetacity-5fdb8463def40bdfa208ecfdd4655209c35e0b2b.tar.gz
metacity-5fdb8463def40bdfa208ecfdd4655209c35e0b2b.tar.bz2
cheesy client with static bit gravity, used to test the below change.
2002-01-19 Havoc Pennington <hp@pobox.com> * src/wm-tester/test-resizing.c: cheesy client with static bit gravity, used to test the below change. * src/window.c (meta_window_move_resize_internal): implement Owen's proposal for window resizing. http://mail.gnome.org/archives/wm-spec-list/1999-November/msg00088.html Currently you have to do METACITY_USE_STATIC_GRAVITY=1 in order to use it, because some GDK bug is screwing up exposes on my frames when it's enabled. * src/display.c (meta_display_create_x_cursor): fix glyph for NE/NW cursors * src/frames.c (get_control): add ability to resize from top * src/frame.c (meta_frame_get_flags): can't resize shaded windows (meta_frame_sync_to_window): add gravity arg * src/common.h (MetaWindowType): move here from window.h so it can be used in themes stuff. (MetaFrameFlags): remove META_FRAME_TRANSIENT since it overlaps with window type and was unused.
Diffstat (limited to 'src/frames.c')
-rw-r--r--src/frames.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/frames.c b/src/frames.c
index ed18b2e..9dff136 100644
--- a/src/frames.c
+++ b/src/frames.c
@@ -2042,8 +2042,28 @@ get_control (MetaFrames *frames,
if (has_vert || has_horiz)
{
- if (y >= (fgeom.height - fgeom.bottom_height - RESIZE_EXTENDS) &&
- x >= (fgeom.width - fgeom.right_width - RESIZE_EXTENDS))
+ if (y < fgeom.top_height && x < RESIZE_EXTENDS)
+ {
+ if (has_vert && has_horiz)
+ return META_FRAME_CONTROL_RESIZE_NW;
+ else if (has_vert)
+ return META_FRAME_CONTROL_RESIZE_N;
+ else
+ return META_FRAME_CONTROL_RESIZE_W;
+
+ }
+ else if (y < fgeom.top_height && x >= (fgeom.width - RESIZE_EXTENDS))
+ {
+ if (has_vert && has_horiz)
+ return META_FRAME_CONTROL_RESIZE_NE;
+ else if (has_vert)
+ return META_FRAME_CONTROL_RESIZE_N;
+ else
+ return META_FRAME_CONTROL_RESIZE_E;
+
+ }
+ else if (y >= (fgeom.height - fgeom.bottom_height - RESIZE_EXTENDS) &&
+ x >= (fgeom.width - fgeom.right_width - RESIZE_EXTENDS))
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_SE;
@@ -2062,6 +2082,11 @@ get_control (MetaFrames *frames,
else
return META_FRAME_CONTROL_RESIZE_W;
}
+ else if (y < fgeom.top_height)
+ {
+ if (has_vert)
+ return META_FRAME_CONTROL_RESIZE_N;
+ }
else if (y >= (fgeom.height - fgeom.bottom_height - RESIZE_EXTENDS))
{
if (has_vert)