summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2004-12-20 02:53:08 +0000
committerElijah Newren <newren@src.gnome.org>2004-12-20 02:53:08 +0000
commitd178f5e330432d05b69485fe184d51826c99e1fd (patch)
treead65b70f7ecd7410884527488b4439819e31b7ee
parentd8d77bd65b03e87e7aba04c1e298568ee7a021b3 (diff)
downloadmetacity-d178f5e330432d05b69485fe184d51826c99e1fd.tar.gz
When snap-moving, don't snap to transients of minimized windows since they
2004-12-19 Elijah Newren <newren@gmail.com> When snap-moving, don't snap to transients of minimized windows since they are hidden. Fixes #157180 * src/place.c (get_windows_on_same_workspace): make the logic to determine hidden windows more thorough by calling meta_window_should_be_showing() * src/window.c (meta_window_should_be_showing): rename this function from window_should_be_showing and also export it, (implement_showing): s/window_should_be_showing/meta_window_should_be_showing/, (idle_calc_showing): s/window_should_be_showing/meta_window_should_be_showing/ * src/window.h (meta_window_should_be_showing): Add this function to the list so that it can be used in src/place.c
-rw-r--r--ChangeLog19
-rw-r--r--src/place.c5
-rw-r--r--src/window.c9
-rw-r--r--src/window.h3
4 files changed, 27 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 9040fbbe..6fd66aa0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,24 @@
2004-12-19 Elijah Newren <newren@gmail.com>
+ When snap-moving, don't snap to transients of minimized windows
+ since they are hidden. Fixes #157180
+
+ * src/place.c (get_windows_on_same_workspace): make the logic to
+ determine hidden windows more thorough by calling
+ meta_window_should_be_showing()
+
+ * src/window.c (meta_window_should_be_showing): rename this
+ function from window_should_be_showing and also export it,
+ (implement_showing):
+ s/window_should_be_showing/meta_window_should_be_showing/,
+ (idle_calc_showing):
+ s/window_should_be_showing/meta_window_should_be_showing/
+
+ * src/window.h (meta_window_should_be_showing): Add this function
+ to the list so that it can be used in src/place.c
+
+2004-12-19 Elijah Newren <newren@gmail.com>
+
Focus the desktop when showing it. Fixes #159257.
* src/display.c (event_callback): obtain a timestamp to pass to
diff --git a/src/place.c b/src/place.c
index 58d962fa..554fa877 100644
--- a/src/place.c
+++ b/src/place.c
@@ -876,10 +876,7 @@ get_windows_on_same_workspace (MetaWindow *window,
{
MetaWindow *w = tmp->data;
- if (!w->minimized &&
- w != window &&
- meta_window_visible_on_workspace (w,
- window->screen->active_workspace))
+ if (meta_window_should_be_showing (w) && w != window)
{
windows = g_slist_prepend (windows, w);
++i;
diff --git a/src/window.c b/src/window.c
index 0743160a..97eea501 100644
--- a/src/window.c
+++ b/src/window.c
@@ -103,7 +103,6 @@ static void ensure_mru_position_after (MetaWindow *window,
void meta_window_move_resize_now (MetaWindow *window);
static gboolean window_showing_on_its_workspace (MetaWindow *window);
-static gboolean window_should_be_showing (MetaWindow *window);
/* FIXME we need an abstraction that covers all these queues. */
@@ -1299,8 +1298,8 @@ window_showing_on_its_workspace (MetaWindow *window)
return showing;
}
-static gboolean
-window_should_be_showing (MetaWindow *window)
+gboolean
+meta_window_should_be_showing (MetaWindow *window)
{
gboolean on_workspace;
@@ -1387,7 +1386,7 @@ implement_showing (MetaWindow *window,
void
meta_window_calc_showing (MetaWindow *window)
{
- implement_showing (window, window_should_be_showing (window));
+ implement_showing (window, meta_window_should_be_showing (window));
}
static guint calc_showing_idle = 0;
@@ -1449,7 +1448,7 @@ idle_calc_showing (gpointer data)
if (!window->placed)
unplaced = g_slist_prepend (unplaced, window);
- else if (window_should_be_showing (window))
+ else if (meta_window_should_be_showing (window))
should_show = g_slist_prepend (should_show, window);
else
should_hide = g_slist_prepend (should_hide, window);
diff --git a/src/window.h b/src/window.h
index 5a2681aa..e6fd89f7 100644
--- a/src/window.h
+++ b/src/window.h
@@ -385,6 +385,9 @@ void meta_window_resize_with_gravity (MetaWindow *window,
void meta_window_fill_horizontal (MetaWindow *window);
void meta_window_fill_vertical (MetaWindow *window);
+/* Return whether the window should be currently mapped */
+gboolean meta_window_should_be_showing (MetaWindow *window);
+
/* This recalcs the window/frame size, and recalcs the frame
* size/contents as well.
*/