[mutter] tiling: add side_by_side suffix to tile code
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] tiling: add side_by_side suffix to tile code
- Date: Thu, 2 Dec 2010 22:44:11 +0000 (UTC)
commit aa3a4a48e47a22d846640e2244ff55761832818f
Author: Ray Strode <rstrode redhat com>
Date: Fri Sep 24 14:31:36 2010 -0400
tiling: add side_by_side suffix to tile code
The meta_window_can_tile function and META_WINDOW_TILED
macro are pretty side-by-side tiling specific, so
rename them.
https://bugzilla.gnome.org/show_bug.cgi?id=630548
src/core/constraints.c | 10 ++++++----
src/core/screen.c | 2 +-
src/core/window-private.h | 8 ++++----
src/core/window.c | 14 +++++++-------
4 files changed, 18 insertions(+), 16 deletions(-)
---
diff --git a/src/core/constraints.c b/src/core/constraints.c
index d5d7353..404028c 100644
--- a/src/core/constraints.c
+++ b/src/core/constraints.c
@@ -796,7 +796,7 @@ constrain_maximization (MetaWindow *window,
/* Determine whether constraint applies; exit if it doesn't */
if ((!window->maximized_horizontally && !window->maximized_vertically) ||
- META_WINDOW_TILED (window))
+ META_WINDOW_TILED_SIDE_BY_SIDE (window))
return TRUE;
/* Calculate target_size = maximized size of (window + frame) */
@@ -880,7 +880,7 @@ constrain_tiling (MetaWindow *window,
return TRUE;
/* Determine whether constraint applies; exit if it doesn't */
- if (!META_WINDOW_TILED (window))
+ if (!META_WINDOW_TILED_SIDE_BY_SIDE (window))
return TRUE;
/* Calculate target_size - as the tile previews need this as well, we
@@ -968,7 +968,8 @@ constrain_size_increments (MetaWindow *window,
/* Determine whether constraint applies; exit if it doesn't */
if (META_WINDOW_MAXIMIZED (window) || window->fullscreen ||
- META_WINDOW_TILED (window) || info->action_type == ACTION_MOVE)
+ META_WINDOW_TILED_SIDE_BY_SIDE (window) ||
+ info->action_type == ACTION_MOVE)
return TRUE;
/* Determine whether constraint is already satisfied; exit if it is */
@@ -1099,7 +1100,8 @@ constrain_aspect_ratio (MetaWindow *window,
constraints_are_inconsistent = minr > maxr;
if (constraints_are_inconsistent ||
META_WINDOW_MAXIMIZED (window) || window->fullscreen ||
- META_WINDOW_TILED (window) || info->action_type == ACTION_MOVE)
+ META_WINDOW_TILED_SIDE_BY_SIDE (window) ||
+ info->action_type == ACTION_MOVE)
return TRUE;
/* Determine whether constraint is already satisfied; exit if it is. We
diff --git a/src/core/screen.c b/src/core/screen.c
index 44377be..c3a4f03 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -1776,7 +1776,7 @@ meta_screen_tile_preview_update_timeout (gpointer data)
}
if (window
- && !META_WINDOW_TILED (window)
+ && !META_WINDOW_TILED_SIDE_BY_SIDE (window)
&& window->tile_mode != META_TILE_NONE)
{
MetaRectangle tile_rect;
diff --git a/src/core/window-private.h b/src/core/window-private.h
index 67fe4d1..cc8a3b3 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -409,11 +409,11 @@ struct _MetaWindowClass
(w)->maximized_vertically)
#define META_WINDOW_MAXIMIZED_VERTICALLY(w) ((w)->maximized_vertically)
#define META_WINDOW_MAXIMIZED_HORIZONTALLY(w) ((w)->maximized_horizontally)
-#define META_WINDOW_TILED(w) ((w)->maximized_vertically && \
- !(w)->maximized_horizontally && \
- (w)->tile_mode != META_TILE_NONE)
+#define META_WINDOW_TILED_SIDE_BY_SIDE(w) ((w)->maximized_vertically && \
+ !(w)->maximized_horizontally && \
+ (w)->tile_mode != META_TILE_NONE)
#define META_WINDOW_ALLOWS_MOVE(w) ((w)->has_move_func && !(w)->fullscreen)
-#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w) ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !META_WINDOW_TILED(w) && !(w)->fullscreen && !(w)->shaded)
+#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w) ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !META_WINDOW_TILED_SIDE_BY_SIDE(w) && !(w)->fullscreen && !(w)->shaded)
#define META_WINDOW_ALLOWS_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && \
(((w)->size_hints.min_width < (w)->size_hints.max_width) || \
((w)->size_hints.min_height < (w)->size_hints.max_height)))
diff --git a/src/core/window.c b/src/core/window.c
index 8b73dfa..d98fb44 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -2972,7 +2972,7 @@ ensure_size_hints_satisfied (MetaRectangle *rect,
static void
meta_window_save_rect (MetaWindow *window)
{
- if (!(META_WINDOW_MAXIMIZED (window) || META_WINDOW_TILED (window) || window->fullscreen))
+ if (!(META_WINDOW_MAXIMIZED (window) || META_WINDOW_TILED_SIDE_BY_SIDE (window) || window->fullscreen))
{
/* save size/pos as appropriate args for move_resize */
if (!window->maximized_horizontally)
@@ -3014,7 +3014,7 @@ force_save_user_window_placement (MetaWindow *window)
static void
save_user_window_placement (MetaWindow *window)
{
- if (!(META_WINDOW_MAXIMIZED (window) || META_WINDOW_TILED (window) || window->fullscreen))
+ if (!(META_WINDOW_MAXIMIZED (window) || META_WINDOW_TILED_SIDE_BY_SIDE (window) || window->fullscreen))
{
MetaRectangle user_rect;
@@ -3218,7 +3218,7 @@ meta_window_tile (MetaWindow *window)
}
static gboolean
-meta_window_can_tile (MetaWindow *window)
+meta_window_can_tile_side_by_side (MetaWindow *window)
{
const MetaMonitorInfo *monitor;
MetaRectangle tile_area;
@@ -7800,7 +7800,7 @@ update_move (MetaWindow *window,
DRAG_THRESHOLD_TO_SHAKE_THRESHOLD_FACTOR;
if (meta_prefs_get_edge_tiling () &&
- meta_window_can_tile (window))
+ meta_window_can_tile_side_by_side (window))
{
const MetaMonitorInfo *monitor;
MetaRectangle work_area;
@@ -7834,12 +7834,12 @@ update_move (MetaWindow *window,
*/
if ((META_WINDOW_MAXIMIZED (window) && ABS (dy) >= shake_threshold) ||
- (META_WINDOW_TILED (window) && (MAX (ABS (dx), ABS (dy)) >= shake_threshold)))
+ (META_WINDOW_TILED_SIDE_BY_SIDE (window) && (MAX (ABS (dx), ABS (dy)) >= shake_threshold)))
{
double prop;
/* Shake loose */
- window->shaken_loose = !META_WINDOW_TILED (window);
+ window->shaken_loose = !META_WINDOW_TILED_SIDE_BY_SIDE (window);
window->tile_mode = META_TILE_NONE;
/* move the unmaximized window to the cursor */
@@ -7936,7 +7936,7 @@ update_move (MetaWindow *window,
meta_window_get_client_root_coords (window, &old);
/* Don't allow movement in the maximized directions or while tiled */
- if (window->maximized_horizontally || META_WINDOW_TILED (window))
+ if (window->maximized_horizontally || META_WINDOW_TILED_SIDE_BY_SIDE (window))
new_x = old.x;
if (window->maximized_vertically)
new_y = old.y;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]