summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2001-08-30 04:01:38 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-08-30 04:01:38 +0000
commit3e1c68b88a5e4d0fd688929fafe280efe73734f8 (patch)
tree396fd512ff3ceb5a0e712dc3c6d9519dc9a7633d /src/screen.c
parent6d31d4756e219696b9ae7cdee986eca452883005 (diff)
downloadmetacity-3e1c68b88a5e4d0fd688929fafe280efe73734f8.tar.gz
avoid focusing a window on tab popup popdown
2001-08-29 Havoc Pennington <hp@pobox.com> * src/display.c (event_callback): avoid focusing a window on tab popup popdown * src/screen.c (meta_screen_ensure_tab_popup): compute frame outline size here
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/screen.c b/src/screen.c
index 22ab84e4..cb486f23 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -491,6 +491,33 @@ meta_screen_ensure_tab_popup (MetaScreen *screen)
entries[i].y = r.y;
entries[i].width = r.width;
entries[i].height = r.height;
+
+ /* Find inside of highlight rectangle to be used
+ * when window is outlined for tabbing.
+ * This should be the size of the east/west frame,
+ * and the size of the south frame, on those sides.
+ * on the top it should be the size of the south frame
+ * edge.
+ */
+ if (window->frame)
+ {
+ int south = window->frame->rect.height - window->frame->child_y -
+ window->rect.height;
+ int east = window->frame->child_x;
+ entries[i].inner_x = east;
+ entries[i].inner_y = south;
+ entries[i].inner_width = window->rect.width;
+ entries[i].inner_height = window->frame->rect.height - south * 2;
+ }
+ else
+ {
+ /* Use an arbitrary border size */
+#define OUTLINE_WIDTH 5
+ entries[i].inner_x = OUTLINE_WIDTH;
+ entries[i].inner_y = OUTLINE_WIDTH;
+ entries[i].inner_width = window->rect.width - OUTLINE_WIDTH * 2;
+ entries[i].inner_height = window->rect.height - OUTLINE_WIDTH * 2;
+ }
++i;
tmp = tmp->next;