diff options
author | rhp <rhp> | 2001-06-11 06:39:12 +0000 |
---|---|---|
committer | rhp <rhp> | 2001-06-11 06:39:12 +0000 |
commit | 073a5d4ea9c15fb30c1fe23c252c6687e820a69d (patch) | |
tree | 5a80b37a9067d6cafc0cff454f70d7fe131b3889 /src/frame.c | |
parent | 99f53856f6153ac88eb6e4698928d4b59910cfbb (diff) | |
download | metacity-073a5d4ea9c15fb30c1fe23c252c6687e820a69d.tar.gz |
...
Diffstat (limited to 'src/frame.c')
-rw-r--r-- | src/frame.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/frame.c b/src/frame.c index 222a1008..789509ca 100644 --- a/src/frame.c +++ b/src/frame.c @@ -38,7 +38,8 @@ struct _MetaFrameActionGrab /* This lacks ButtonReleaseMask to avoid the auto-grab * since it breaks our popup menu */ -#define EVENT_MASK (StructureNotifyMask | SubstructureNotifyMask | \ +#define EVENT_MASK (SubstructureRedirectMask | \ + StructureNotifyMask | SubstructureNotifyMask | \ ExposureMask | \ ButtonPressMask | ButtonReleaseMask | \ PointerMotionMask | PointerMotionHintMask | \ @@ -51,11 +52,19 @@ meta_frame_init_info (MetaFrame *frame, MetaFrameInfo *info) { info->flags = - META_FRAME_ALLOWS_MENU | META_FRAME_ALLOWS_DELETE | - META_FRAME_ALLOWS_RESIZE; + META_FRAME_ALLOWS_MENU | META_FRAME_ALLOWS_RESIZE; + if (frame->window->has_close_func) + info->flags |= META_FRAME_ALLOWS_DELETE; + if (frame->window->type == META_WINDOW_NORMAL) info->flags |= (META_FRAME_ALLOWS_ICONIFY | META_FRAME_ALLOWS_MAXIMIZE); + + if (!frame->window->has_maximize_func) + info->flags &= ~META_FRAME_ALLOWS_MAXIMIZE; + + if (!frame->window->has_minimize_func) + info->flags &= ~META_FRAME_ALLOWS_ICONIFY; if (frame->window->has_focus) info->flags |= META_FRAME_HAS_FOCUS; |