summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2002-08-04 20:20:53 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-08-04 20:20:53 +0000
commit585e3625266dd0fadcdb033739760db423d31714 (patch)
tree0b7009b43fc3b584f5eca6dbe1894c3180ca3e7c /src
parent8984fd358b29c2286a0f4763a297205645366dd0 (diff)
downloadmetacity-585e3625266dd0fadcdb033739760db423d31714.tar.gz
metacity-585e3625266dd0fadcdb033739760db423d31714.tar.bz2
raise/focus on click, even if the click was on the client area (this makes
2002-08-04 Havoc Pennington <hp@redhat.com> * src/frames.c (meta_frames_button_press_event): raise/focus on click, even if the click was on the client area (this makes Alt+button1 raise windows again, yay) * src/stack.c (compute_layer): put panels in the DOCK layer always (keep them on top of other windows). Still sloppy-focus raised with respect to other docks. * configure.in: remove -Wshadow for now as GTK headers make all kinds of noise with it.
Diffstat (limited to 'src')
-rw-r--r--src/core.c3
-rw-r--r--src/display.c4
-rw-r--r--src/frames.c9
-rw-r--r--src/stack.c2
4 files changed, 13 insertions, 5 deletions
diff --git a/src/core.c b/src/core.c
index 4a66c7a..ae630cd 100644
--- a/src/core.c
+++ b/src/core.c
@@ -610,7 +610,8 @@ meta_core_grab_buttons (Display *xdisplay,
MetaDisplay *display;
display = meta_display_for_x_display (xdisplay);
-
+
+ meta_verbose ("Grabbing buttons on frame 0x%lx\n", frame_xwindow);
meta_display_grab_window_buttons (display, frame_xwindow);
}
diff --git a/src/display.c b/src/display.c
index 15b96b9..3c6b7a4 100644
--- a/src/display.c
+++ b/src/display.c
@@ -1022,6 +1022,10 @@ event_callback (XEvent *event,
window->frame &&
modified == window->frame->xwindow)
{
+ /* Note that if the frame and the client both have an
+ * XGrabButton (as is normal with our setup), the event
+ * goes to the frame.
+ */
frame_was_receiver = TRUE;
meta_topic (META_DEBUG_EVENTS, "Frame was receiver of event\n");
}
diff --git a/src/frames.c b/src/frames.c
index fffdcfc..18ca609 100644
--- a/src/frames.c
+++ b/src/frames.c
@@ -1002,9 +1002,7 @@ 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 */
-
+ /* raise/focus on click, even if click was on client area */
if (event->button == 1 &&
!(control == META_FRAME_CONTROL_MINIMIZE ||
control == META_FRAME_CONTROL_DELETE))
@@ -1018,6 +1016,10 @@ meta_frames_button_press_event (GtkWidget *widget,
frame->xwindow,
event->time);
}
+
+ /* don't do the rest of this if on client area */
+ 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.
@@ -1538,6 +1540,7 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
button_states[META_BUTTON_TYPE_CLOSE] = META_BUTTON_STATE_PRELIGHT;
break;
default:
+ break;
}
grab_frame = meta_core_get_grab_frame (gdk_display);
diff --git a/src/stack.c b/src/stack.c
index 50f7342..c55ef45 100644
--- a/src/stack.c
+++ b/src/stack.c
@@ -267,7 +267,7 @@ compute_layer (MetaWindow *window)
case META_WINDOW_DOCK:
/* still experimenting here */
- window->layer = META_LAYER_NORMAL;
+ window->layer = META_LAYER_DOCK;
break;
case META_WINDOW_SPLASHSCREEN: