summaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
authorrhp <rhp>2001-06-20 03:01:26 +0000
committerrhp <rhp>2001-06-20 03:01:26 +0000
commitca69bef032ad7952f0020663ac24a38d7d1563b3 (patch)
tree51244e59d91e4f4140a79ea2e2ea127111dbd8d8 /src/frame.c
parent5fd26a273dc8fb6cb4b98dcb9883457d48544f45 (diff)
downloadmetacity-ca69bef032ad7952f0020663ac24a38d7d1563b3.tar.gz
...
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/frame.c b/src/frame.c
index dfa050bf..f7acb261 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -22,6 +22,13 @@
#include "frame.h"
#include "errors.h"
+#define EVENT_MASK (SubstructureRedirectMask | \
+ StructureNotifyMask | SubstructureNotifyMask | \
+ ExposureMask | \
+ ButtonPressMask | ButtonReleaseMask | \
+ PointerMotionMask | PointerMotionHintMask | \
+ EnterWindowMask | LeaveWindowMask)
+
void
meta_window_ensure_frame (MetaWindow *window)
{
@@ -46,9 +53,7 @@ meta_window_ensure_frame (MetaWindow *window)
frame->mapped = FALSE;
- attrs.event_mask = SubstructureRedirectMask |
- StructureNotifyMask | SubstructureNotifyMask |
- EnterWindowMask | LeaveWindowMask;
+ attrs.event_mask = EVENT_MASK;
frame->xwindow = XCreateWindow (window->display->xdisplay,
window->screen->xroot,
@@ -92,10 +97,15 @@ meta_window_ensure_frame (MetaWindow *window)
window->rect.y);
meta_error_trap_pop (window->display);
- meta_ui_add_frame (window->screen->ui, frame->xwindow);
-
/* stick frame to the window */
window->frame = frame;
+
+ meta_ui_add_frame (window->screen->ui, frame->xwindow);
+
+ if (window->title)
+ meta_ui_set_frame_title (window->screen->ui,
+ window->frame->xwindow,
+ window->title);
}
void