summaryrefslogtreecommitdiff
path: root/src/frames.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2001-10-14 04:11:42 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-10-14 04:11:42 +0000
commit282b52d6b7c5675d49e113073af3f66bbaadd8b8 (patch)
tree30cdf333af0b8a552fd7b95dddcbafd6951b28ea /src/frames.c
parent9c8824542e8402a38f6746a1fe99a38dcdca5ae9 (diff)
downloadmetacity-282b52d6b7c5675d49e113073af3f66bbaadd8b8.tar.gz
only handle events here if the modmask from our button grab is active.
2001-10-14 Havoc Pennington <hp@pobox.com> * src/display.c (event_callback): only handle events here if the modmask from our button grab is active. i.e. only the Alt-click is handled here. * src/frames.c: add check for whether button presses are in the frame client area before handling them, so we don't weirdly let you move a frame by clicking in its client area if the client hasn't selected button press events.
Diffstat (limited to 'src/frames.c')
-rw-r--r--src/frames.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/frames.c b/src/frames.c
index 6af4ecd1..7e1c38b9 100644
--- a/src/frames.c
+++ b/src/frames.c
@@ -81,7 +81,7 @@ struct _MetaFrameGeometry
GdkRectangle min_rect;
GdkRectangle spacer_rect;
GdkRectangle menu_rect;
- GdkRectangle title_rect;
+ GdkRectangle title_rect;
};
static void meta_frames_class_init (MetaFramesClass *klass);
@@ -496,6 +496,12 @@ meta_frames_calc_geometry (MetaFrames *frames,
props = *(frames->props);
+ /* FIXME this is totally broken - the w/h here are the size of the
+ * frame xwindow, which is computed from the size the frame wants to
+ * be, which we are currently computing - stuff just happens to work
+ * now because we always go through this codepath twice, or don't
+ * really use these values, or something.
+ */
meta_core_get_frame_size (gdk_display, frame->xwindow,
&width, &height);
@@ -910,7 +916,9 @@ show_tip_now (MetaFrames *frames)
break;
case META_FRAME_CONTROL_RESIZE_E:
break;
- case META_FRAME_CONTROL_NONE:
+ case META_FRAME_CONTROL_NONE:
+ break;
+ case META_FRAME_CONTROL_CLIENT_AREA:
break;
}
@@ -1015,6 +1023,9 @@ meta_frames_button_press_event (GtkWidget *widget,
control = get_control (frames, frame, event->x, event->y);
+ if (control == META_FRAME_CONTROL_CLIENT_AREA)
+ return FALSE; /* not on the frame, just passed through from client */
+
/* We want to shade even if we have a GrabOp, since we'll have a move grab
* if we double click the titlebar.
*/
@@ -1357,6 +1368,8 @@ meta_frames_motion_notify_event (GtkWidget *widget,
switch (control)
{
+ case META_FRAME_CONTROL_CLIENT_AREA:
+ break;
case META_FRAME_CONTROL_NONE:
break;
case META_FRAME_CONTROL_TITLE:
@@ -2151,6 +2164,8 @@ control_rect (MetaFrameControl control,
break;
case META_FRAME_CONTROL_NONE:
break;
+ case META_FRAME_CONTROL_CLIENT_AREA:
+ break;
}
return rect;
@@ -2181,7 +2196,7 @@ get_control (MetaFrames *frames,
client.height = fgeom.height - fgeom.top_height - fgeom.bottom_height;
if (POINT_IN_RECT (x, y, client))
- return META_FRAME_CONTROL_NONE;
+ return META_FRAME_CONTROL_CLIENT_AREA;
if (POINT_IN_RECT (x, y, fgeom.close_rect))
return META_FRAME_CONTROL_DELETE;