summaryrefslogtreecommitdiff
path: root/src/core/window.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-08-04 10:39:44 +0200
committerraveit65 <[email protected]>2020-08-04 16:39:25 +0200
commit85a22e754cd1f43e178e4a81c182643d4319bc5b (patch)
treeec52f20880ba991d7abcc863de2a9c302ddf2d41 /src/core/window.c
parent29f0d1d7ddd859433bf953fba3861a4746b3f09a (diff)
downloadmarco-85a22e754cd1f43e178e4a81c182643d4319bc5b.tar.bz2
marco-85a22e754cd1f43e178e4a81c182643d4319bc5b.tar.xz
Remove trailing spaces/tabs
find . \( -name '*.h' -o -name '*.c' \) -exec sed -i 's/[[:space:]]*$//' {} \; find . \( -name '*.h' -o -name '*.c' \) -exec sed -i 's/\t*$//' {} \;
Diffstat (limited to 'src/core/window.c')
-rw-r--r--src/core/window.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/core/window.c b/src/core/window.c
index bc04b644..b86e6232 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -2743,7 +2743,7 @@ meta_window_tile (MetaWindow *window)
else
meta_window_save_rect(window);
-
+
window->tiled = TRUE;
/* move_resize with new tiling constraints
*/
@@ -2892,7 +2892,7 @@ meta_window_move_to_monitor(MetaWindow *window,
const MetaXineramaScreenInfo *to_monitor)
{
MetaRectangle target_rect;
-
+
if(META_WINDOW_TILED (window))
{
window->tile_monitor_number = to_monitor->number;
@@ -2911,11 +2911,11 @@ meta_window_move_to_monitor(MetaWindow *window,
/* Normally, just transform the window itself */
meta_window_get_client_root_coords(window, &target_rect);
-
+
meta_window_transform_to_monitor(&target_rect,
&from_monitor->rect,
&to_monitor->rect);
-
+
meta_window_move_resize(window, TRUE,
target_rect.x,
target_rect.y,
@@ -2929,7 +2929,7 @@ static void meta_window_transform_to_monitor(MetaRectangle *target_rect,
{
double horizontal_ratio;
double vertical_ratio;
-
+
horizontal_ratio = (double)to_monitor->width / from_monitor->width;
vertical_ratio = (double)to_monitor->height / from_monitor->height;
@@ -4997,8 +4997,8 @@ meta_window_move_resize_request (MetaWindow *window,
y,
width,
height);
-
- }
+
+ }
/* window->user_rect exists to allow "snapping-back" the window if a
* new strut is set (causing the window to move) and then the strut
@@ -7454,17 +7454,17 @@ 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))
{
new_x = old.x;
}
-
+
if (window->maximized_vertically || META_WINDOW_CORNER_TILED(window))
{
new_y = old.y;
}
-
+
/* Do any edge resistance/snapping */
meta_window_edge_resistance_for_move (window,
@@ -7500,39 +7500,39 @@ static MetaTileMode calculate_tiling_mode(int x,
const MetaXineramaScreenInfo *monitor,
MetaRectangle work_area,
int shake_threshold)
-{
+{
if (meta_window_can_tile (window) &&
x >= monitor->rect.x
&& x < (work_area.x + shake_threshold))
{
if(y >= monitor->rect.y && y < work_area.y + shake_threshold)
- return META_TILE_TOP_LEFT;
+ return META_TILE_TOP_LEFT;
else if(y < monitor->rect.y + monitor->rect.height
&& y > work_area.y + work_area.height - shake_threshold)
- return META_TILE_BOTTOM_LEFT;
+ return META_TILE_BOTTOM_LEFT;
else
- return META_TILE_LEFT;
+ return META_TILE_LEFT;
}
-
+
else if (meta_window_can_tile (window) &&
x >= work_area.x + work_area.width - shake_threshold &&
x < (monitor->rect.x + monitor->rect.width))
{
if(y >= monitor->rect.y && y < work_area.y + shake_threshold)
- return META_TILE_TOP_RIGHT;
+ return META_TILE_TOP_RIGHT;
else if(y < monitor->rect.y + monitor->rect.height
&& y > work_area.y + work_area.height - shake_threshold)
- return META_TILE_BOTTOM_RIGHT;
+ return META_TILE_BOTTOM_RIGHT;
else
- return META_TILE_RIGHT;
+ return META_TILE_RIGHT;
}
else if (meta_window_can_tile_maximized (window) &&
y >= monitor->rect.y && y <= work_area.y &&
meta_prefs_get_allow_top_tiling ())
- return META_TILE_MAXIMIZED;
+ return META_TILE_MAXIMIZED;
else
return META_TILE_NONE;
-
+
}