summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-09-04 02:21:26 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-09-04 02:21:26 +0000
commita5c4eaa55cafea6abcf4423c2412e41e0ff38f89 (patch)
tree64a1ee5fd2e893e055b90f9d8ef5c9d7d9cbd56e /src
parent44cbcaa3879ef6e9a7b88c62af2fa16938db0a31 (diff)
downloadmetacity-a5c4eaa55cafea6abcf4423c2412e41e0ff38f89.tar.gz
metacity-a5c4eaa55cafea6abcf4423c2412e41e0ff38f89.tar.bz2
don't filter out prelight for unmaximize button. #83860
2002-09-03 Havoc Pennington <hp@pobox.com> * src/frames.c (meta_frames_update_prelit_control): don't filter out prelight for unmaximize button. #83860 (meta_frames_paint_to_drawable): handle unmaximize here as well
Diffstat (limited to 'src')
-rw-r--r--src/frames.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/frames.c b/src/frames.c
index 03d7b7f..9736976 100644
--- a/src/frames.c
+++ b/src/frames.c
@@ -1383,14 +1383,22 @@ meta_frames_update_prelit_control (MetaFrames *frames,
/* set/unset the prelight cursor */
meta_core_set_screen_cursor (gdk_display,
frame->xwindow,
- cursor);
-
- /* Only prelight buttons */
- if (control != META_FRAME_CONTROL_MENU &&
- control != META_FRAME_CONTROL_MINIMIZE &&
- control != META_FRAME_CONTROL_MAXIMIZE &&
- control != META_FRAME_CONTROL_DELETE)
- control = META_FRAME_CONTROL_NONE;
+ cursor);
+
+ switch (control)
+ {
+ case META_FRAME_CONTROL_MENU:
+ case META_FRAME_CONTROL_MINIMIZE:
+ case META_FRAME_CONTROL_MAXIMIZE:
+ case META_FRAME_CONTROL_DELETE:
+ case META_FRAME_CONTROL_UNMAXIMIZE:
+ /* leave control set */
+ break;
+ default:
+ /* Only prelight buttons */
+ control = META_FRAME_CONTROL_NONE;
+ break;
+ }
if (control == frame->prelit_control)
return;
@@ -1537,6 +1545,7 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
button_states[META_BUTTON_TYPE_MINIMIZE] = META_BUTTON_STATE_PRELIGHT;
break;
case META_FRAME_CONTROL_MAXIMIZE:
+ case META_FRAME_CONTROL_UNMAXIMIZE:
button_states[META_BUTTON_TYPE_MAXIMIZE] = META_BUTTON_STATE_PRELIGHT;
break;
case META_FRAME_CONTROL_DELETE:
@@ -1561,9 +1570,6 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
META_BUTTON_STATE_PRESSED;
break;
case META_GRAB_OP_CLICKING_MAXIMIZE:
- button_states[META_BUTTON_TYPE_MAXIMIZE] =
- META_BUTTON_STATE_PRESSED;
- break;
case META_GRAB_OP_CLICKING_UNMAXIMIZE:
button_states[META_BUTTON_TYPE_MAXIMIZE] =
META_BUTTON_STATE_PRESSED;