mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
make Alt+button2 do a resize
2002-05-09 Havoc Pennington <hp@redhat.com> * src/display.c (event_callback): make Alt+button2 do a resize
This commit is contained in:
parent
8f5c12d76d
commit
6d2c558bd8
@ -1,3 +1,7 @@
|
||||
2002-05-09 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* src/display.c (event_callback): make Alt+button2 do a resize
|
||||
|
||||
2002-05-08 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* src/fixedtip.c (meta_fixed_tip_show):
|
||||
|
@ -952,7 +952,37 @@ event_callback (XEvent *event,
|
||||
}
|
||||
else if (event->xbutton.button == 2)
|
||||
{
|
||||
begin_move = TRUE;
|
||||
if (window->has_resize_func)
|
||||
{
|
||||
gboolean north;
|
||||
gboolean west;
|
||||
int root_x, root_y;
|
||||
MetaGrabOp op;
|
||||
|
||||
meta_window_get_position (window, &root_x, &root_y);
|
||||
|
||||
west = event->xbutton.x_root < (root_x + window->rect.width / 2);
|
||||
north = event->xbutton.y_root < (root_y + window->rect.height / 2);
|
||||
|
||||
if (west && north)
|
||||
op = META_GRAB_OP_RESIZING_NW;
|
||||
else if (west)
|
||||
op = META_GRAB_OP_RESIZING_SW;
|
||||
else if (north)
|
||||
op = META_GRAB_OP_RESIZING_NE;
|
||||
else
|
||||
op = META_GRAB_OP_RESIZING_SE;
|
||||
|
||||
meta_display_begin_grab_op (display,
|
||||
window,
|
||||
op,
|
||||
TRUE,
|
||||
event->xbutton.button,
|
||||
0,
|
||||
event->xbutton.time,
|
||||
event->xbutton.x_root,
|
||||
event->xbutton.y_root);
|
||||
}
|
||||
}
|
||||
else if (event->xbutton.button == 3)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user