summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrhp <rhp>2001-06-11 06:39:12 +0000
committerrhp <rhp>2001-06-11 06:39:12 +0000
commit073a5d4ea9c15fb30c1fe23c252c6687e820a69d (patch)
tree5a80b37a9067d6cafc0cff454f70d7fe131b3889 /src
parent99f53856f6153ac88eb6e4698928d4b59910cfbb (diff)
downloadmetacity-073a5d4ea9c15fb30c1fe23c252c6687e820a69d.tar.gz
metacity-073a5d4ea9c15fb30c1fe23c252c6687e820a69d.tar.bz2
...
Diffstat (limited to 'src')
-rw-r--r--src/display.c5
-rw-r--r--src/frame.c15
-rwxr-xr-xsrc/run-metacity.sh4
-rw-r--r--src/window.c23
4 files changed, 40 insertions, 7 deletions
diff --git a/src/display.c b/src/display.c
index b38c01c..6a72c37 100644
--- a/src/display.c
+++ b/src/display.c
@@ -562,6 +562,11 @@ event_queue_callback (MetaEventQueue *queue,
case MapRequest:
if (window == NULL)
window = meta_window_new (display, event->xmaprequest.window, FALSE);
+ else if (window)
+ {
+ if (window->minimized)
+ meta_window_unminimize (window);
+ }
break;
case ReparentNotify:
break;
diff --git a/src/frame.c b/src/frame.c
index 222a100..789509c 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;
diff --git a/src/run-metacity.sh b/src/run-metacity.sh
index abf28b3..cef1d71 100755
--- a/src/run-metacity.sh
+++ b/src/run-metacity.sh
@@ -22,10 +22,12 @@ if test -z "$ONLY_WM"; then
DISPLAY=:1 xterm -geometry 25x15 &
done
fi
+
+ usleep 5000
DISPLAY=:1 xsetroot -solid royalblue3
fi
if test -z "$ONLY_SETUP"; then
- METACITY_UISLAVE_DIR=./uislave DISPLAY=:1 unst libtool --mode=execute $DEBUG ./metacity
+ METACITY_UISLAVE_DIR=./uislave DISPLAY=:1 exec unst libtool --mode=execute $DEBUG ./metacity
fi
diff --git a/src/window.c b/src/window.c
index 9f6ac08..ab8dd92 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1965,9 +1965,14 @@ update_mwm_hints (MetaWindow *window)
return -1; /* whatever */
/* We support MWM hints deemed non-stupid */
+
+ meta_verbose ("Window %s has MWM hints\n",
+ window->desc);
if (hints->flags & MWM_HINTS_DECORATIONS)
{
+ meta_verbose ("Window %s sets MWM decorations to 0x%lx\n",
+ window->desc, hints->decorations);
if (hints->decorations == 0)
window->decorated = FALSE;
}
@@ -1975,11 +1980,23 @@ update_mwm_hints (MetaWindow *window)
if (hints->flags & MWM_HINTS_FUNCTIONS)
{
if ((hints->functions & MWM_FUNC_CLOSE) == 0)
- window->has_close_func = FALSE;
+ {
+ meta_verbose ("Window %s disables close via MWM hints\n",
+ window->desc);
+ window->has_close_func = FALSE;
+ }
if ((hints->functions & MWM_FUNC_MINIMIZE) == 0)
- window->has_minimize_func = FALSE;
+ {
+ meta_verbose ("Window %s disables minimize via MWM hints\n",
+ window->desc);
+ window->has_minimize_func = FALSE;
+ }
if ((hints->functions & MWM_FUNC_MAXIMIZE) == 0)
- window->has_maximize_func = FALSE;
+ {
+ meta_verbose ("Window %s disables maximize via MWM hints\n",
+ window->desc);
+ window->has_maximize_func = FALSE;
+ }
}
XFree (hints);