summaryrefslogtreecommitdiff
path: root/src/window.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2001-08-29 03:37:03 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-08-29 03:37:03 +0000
commitdb0a7e29789b04fde38b9ca3b4aa855a6d9526f3 (patch)
treedc61c25feb50d9e56e36b0d51dd12a4b6c6a891c /src/window.h
parent4d2f018ddb7e643cb56b22ff63b69466df8d1ab6 (diff)
downloadmetacity-db0a7e29789b04fde38b9ca3b4aa855a6d9526f3.tar.gz
metacity-db0a7e29789b04fde38b9ca3b4aa855a6d9526f3.tar.bz2
Unbreak tab popup a bit.
2001-08-28 Havoc Pennington <hp@pobox.com> Unbreak tab popup a bit. * src/stack.c (meta_stack_get_tab_list): add workspace argument (meta_stack_get_tab_next): add workspace argument * src/window.c: implement recording of the last user-initiated window position, so we can magically handle moving panels around really nicely. * src/wm-tester/main.c (set_up_icon_windows): fix to use new GTK API
Diffstat (limited to 'src/window.h')
-rw-r--r--src/window.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/window.h b/src/window.h
index 3913d23..e13bca3 100644
--- a/src/window.h
+++ b/src/window.h
@@ -156,8 +156,7 @@ struct _MetaWindow
guint has_focus : 1;
/* Track whether the user has ever manually modified
- * the window; if so, we remove some constraints
- * that exist on program modifications.
+ * the window; if so, we can use the saved user size/pos
*/
guint user_has_resized : 1;
guint user_has_moved : 1;
@@ -191,7 +190,7 @@ struct _MetaWindow
* is withdrawing the window.
*/
int unmaps_pending;
-
+
/* The size we set the window to last (i.e. what we believe
* to be its actual size on the server). The x, y are
* the actual server-side x,y so are relative to the frame
@@ -205,6 +204,17 @@ struct _MetaWindow
* above.
*/
MetaRectangle saved_rect;
+
+ /* This is the geometry the window had after the last user-initiated
+ * move/resize operations. We use this whenever we are moving the
+ * implicitly (for example, if we move to avoid a panel, we
+ * can snap back to this position if the panel moves again)
+ *
+ * Position valid if user_has_moved, size valid if user_has_resized
+ *
+ * Position always in root coords, unlike window->rect
+ */
+ MetaRectangle user_rect;
/* Requested geometry */
int border_width;
@@ -235,17 +245,21 @@ void meta_window_unstick (MetaWindow *window);
/* args to move are window pos, not frame pos */
void meta_window_move (MetaWindow *window,
+ gboolean user_op,
int root_x_nw,
int root_y_nw);
void meta_window_resize (MetaWindow *window,
+ gboolean user_op,
int w,
int h);
void meta_window_move_resize (MetaWindow *window,
+ gboolean user_op,
int root_x_nw,
int root_y_nw,
int w,
int h);
-void meta_window_resize_with_gravity (MetaWindow *window,
+void meta_window_resize_with_gravity (MetaWindow *window,
+ gboolean user_op,
int w,
int h,
int gravity);
@@ -259,6 +273,9 @@ void meta_window_queue_move_resize (MetaWindow *window);
void meta_window_get_position (MetaWindow *window,
int *x,
int *y);
+void meta_window_get_user_position (MetaWindow *window,
+ int *x,
+ int *y);
/* gets position we need to set to stay in current position,
* assuming position will be gravity-compensated. i.e.
* this is the position a client would send in a configure