[mutter] core: Replace lower_beneath_focus_window()
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] core: Replace lower_beneath_focus_window()
- Date: Sat, 9 Jul 2011 00:55:38 +0000 (UTC)
commit 4a10c95e76da9f36d2bc291dab481f839fd21ed0
Author: Florian MÃllner <fmuellner gnome org>
Date: Fri May 20 17:41:19 2011 +0200
core: Replace lower_beneath_focus_window()
The code assumed that the focus window was always the one at the
top of the window stack, which is not true if an unfocused window
has the above hint set.
Rather than fixing this assumption, rename the function to
lower_beneath_grab_window() and use the display's grab window - the
function is only used for displaying the tile previews, which means
that we want the grab window anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=650661
src/core/core.c | 16 ++++++++--------
src/core/core.h | 6 +++---
src/ui/tile-preview.c | 6 +++---
3 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/src/core/core.c b/src/core/core.c
index d60d88a..16f51cc 100644
--- a/src/core/core.c
+++ b/src/core/core.c
@@ -261,25 +261,25 @@ meta_core_user_lower_and_unfocus (Display *xdisplay,
}
void
-meta_core_lower_beneath_focus_window (Display *xdisplay,
- Window xwindow,
- guint32 timestamp)
+meta_core_lower_beneath_grab_window (Display *xdisplay,
+ Window xwindow,
+ guint32 timestamp)
{
XWindowChanges changes;
MetaDisplay *display;
MetaScreen *screen;
- MetaWindow *focus_window;
+ MetaWindow *grab_window;
display = meta_display_for_x_display (xdisplay);
screen = meta_display_screen_for_xwindow (display, xwindow);
- focus_window = meta_stack_get_top (screen->stack);
+ grab_window = display->grab_window;
- if (focus_window == NULL)
+ if (grab_window == NULL)
return;
changes.stack_mode = Below;
- changes.sibling = focus_window->frame ? focus_window->frame->xwindow
- : focus_window->xwindow;
+ changes.sibling = grab_window->frame ? grab_window->frame->xwindow
+ : grab_window->xwindow;
meta_stack_tracker_record_lower_below (screen->stack_tracker,
xwindow,
diff --git a/src/core/core.h b/src/core/core.h
index 39414cf..12451bd 100644
--- a/src/core/core.h
+++ b/src/core/core.h
@@ -116,9 +116,9 @@ void meta_core_user_focus (Display *xdisplay,
Window frame_xwindow,
guint32 timestamp);
-void meta_core_lower_beneath_focus_window (Display *xdisplay,
- Window xwindow,
- guint32 timestamp);
+void meta_core_lower_beneath_grab_window (Display *xdisplay,
+ Window xwindow,
+ guint32 timestamp);
void meta_core_minimize (Display *xdisplay,
Window frame_xwindow);
diff --git a/src/ui/tile-preview.c b/src/ui/tile-preview.c
index 01cd9c9..f09c62a 100644
--- a/src/ui/tile-preview.c
+++ b/src/ui/tile-preview.c
@@ -185,9 +185,9 @@ meta_tile_preview_show (MetaTilePreview *preview,
gtk_widget_show (preview->preview_window);
window = gtk_widget_get_window (preview->preview_window);
- meta_core_lower_beneath_focus_window (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
- GDK_WINDOW_XID (window),
- gtk_get_current_event_time ());
+ meta_core_lower_beneath_grab_window (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
+ GDK_WINDOW_XID (window),
+ gtk_get_current_event_time ());
old_rect.x = old_rect.y = 0;
old_rect.width = preview->tile_rect.width;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]