diff options
Diffstat (limited to 'src/ui/frames.c')
-rw-r--r-- | src/ui/frames.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/ui/frames.c b/src/ui/frames.c index a8cb96fa..c0ad3ede 100644 --- a/src/ui/frames.c +++ b/src/ui/frames.c @@ -1116,6 +1116,9 @@ show_tip_now (MetaFrames *frames) case META_FRAME_CONTROL_MENU: tiptext = _("Window Menu"); break; + case META_FRAME_CONTROL_APPMENU: + tiptext = _("Window App Menu"); + break; case META_FRAME_CONTROL_MINIMIZE: tiptext = _("Minimize Window"); break; @@ -1466,6 +1469,9 @@ meta_frames_button_press_event (GtkWidget *widget, case META_FRAME_CONTROL_MENU: op = META_GRAB_OP_CLICKING_MENU; break; + case META_FRAME_CONTROL_APPMENU: + op = META_GRAB_OP_CLICKING_APPMENU; + break; case META_FRAME_CONTROL_SHADE: op = META_GRAB_OP_CLICKING_SHADE; break; @@ -1730,6 +1736,7 @@ meta_frames_button_release_event (GtkWidget *widget, break; case META_GRAB_OP_CLICKING_MENU: + case META_GRAB_OP_CLICKING_APPMENU: meta_core_end_grab_op (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), event->time); break; @@ -1816,6 +1823,8 @@ meta_frames_update_prelit_control (MetaFrames *frames, break; case META_FRAME_CONTROL_MENU: break; + case META_FRAME_CONTROL_APPMENU: + break; case META_FRAME_CONTROL_MINIMIZE: break; case META_FRAME_CONTROL_MAXIMIZE: @@ -1868,6 +1877,7 @@ meta_frames_update_prelit_control (MetaFrames *frames, switch (control) { case META_FRAME_CONTROL_MENU: + case META_FRAME_CONTROL_APPMENU: case META_FRAME_CONTROL_MINIMIZE: case META_FRAME_CONTROL_MAXIMIZE: case META_FRAME_CONTROL_DELETE: @@ -1921,6 +1931,7 @@ meta_frames_motion_notify_event (GtkWidget *widget, switch (grab_op) { case META_GRAB_OP_CLICKING_MENU: + case META_GRAB_OP_CLICKING_APPMENU: case META_GRAB_OP_CLICKING_DELETE: case META_GRAB_OP_CLICKING_MINIMIZE: case META_GRAB_OP_CLICKING_MAXIMIZE: @@ -1951,6 +1962,8 @@ meta_frames_motion_notify_event (GtkWidget *widget, control = get_control (frames, frame, x, y); if (! ((control == META_FRAME_CONTROL_MENU && grab_op == META_GRAB_OP_CLICKING_MENU) || + (control == META_FRAME_CONTROL_APPMENU && + grab_op == META_GRAB_OP_CLICKING_APPMENU) || (control == META_FRAME_CONTROL_DELETE && grab_op == META_GRAB_OP_CLICKING_DELETE) || (control == META_FRAME_CONTROL_MINIMIZE && @@ -2352,6 +2365,12 @@ meta_frames_paint_to_drawable (MetaFrames *frames, else button_states[META_BUTTON_TYPE_MENU] = META_BUTTON_STATE_PRELIGHT; break; + case META_FRAME_CONTROL_APPMENU: + if (grab_op == META_GRAB_OP_CLICKING_MENU) + button_states[META_BUTTON_TYPE_APPMENU] = META_BUTTON_STATE_PRESSED; + else + button_states[META_BUTTON_TYPE_APPMENU] = META_BUTTON_STATE_PRELIGHT; + break; case META_FRAME_CONTROL_MINIMIZE: if (grab_op == META_GRAB_OP_CLICKING_MINIMIZE) button_states[META_BUTTON_TYPE_MINIMIZE] = META_BUTTON_STATE_PRESSED; @@ -2549,6 +2568,9 @@ control_rect (MetaFrameControl control, case META_FRAME_CONTROL_MENU: rect = &fgeom->menu_rect.visible; break; + case META_FRAME_CONTROL_APPMENU: + rect = &fgeom->appmenu_rect.visible; + break; case META_FRAME_CONTROL_MINIMIZE: rect = &fgeom->min_rect.visible; break; @@ -2635,6 +2657,9 @@ get_control (MetaFrames *frames, if (POINT_IN_RECT (x, y, fgeom.menu_rect.clickable)) return META_FRAME_CONTROL_MENU; + if (POINT_IN_RECT (x, y, fgeom.appmenu_rect.clickable)) + return META_FRAME_CONTROL_APPMENU; + meta_core_get (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), frame->xwindow, META_CORE_GET_FRAME_FLAGS, &flags, META_CORE_GET_END); |