frames: Always start grab operation on left click

When left-clicking the frame border with the titlebar being
off-screen, rather than starting the expected grab operation the
window menu was popped up.
This behavior is pretty confusing, especially since the menu button
was removed from the default layout, making right-clicking the only
way to get to the window menu.

https://bugzilla.gnome.org/show_bug.cgi?id=652369
This commit is contained in:
Florian Müllner 2011-06-15 20:58:12 +02:00
parent 35d300b916
commit 526bc34bba

View File

@ -1710,7 +1710,6 @@ meta_frames_button_press_event (GtkWidget *widget,
control == META_FRAME_CONTROL_RESIZE_W))
{
MetaGrabOp op;
gboolean titlebar_is_onscreen;
op = META_GRAB_OP_NONE;
@ -1745,28 +1744,16 @@ meta_frames_button_press_event (GtkWidget *widget,
break;
}
meta_core_get (display, frame->xwindow,
META_CORE_IS_TITLEBAR_ONSCREEN, &titlebar_is_onscreen,
META_CORE_GET_END);
if (!titlebar_is_onscreen)
meta_core_show_window_menu (display,
frame->xwindow,
event->x_root,
event->y_root,
event->button,
event->time);
else
meta_core_begin_grab_op (display,
frame->xwindow,
op,
TRUE,
TRUE,
event->button,
0,
event->time,
event->x_root,
event->y_root);
meta_core_begin_grab_op (display,
frame->xwindow,
op,
TRUE,
TRUE,
event->button,
0,
event->time,
event->x_root,
event->y_root);
}
else if (control == META_FRAME_CONTROL_TITLE &&
event->button == 1)