Skip to content

Commit 9496a98

Browse files
committed
Merge branch 'master' of ssh://github.com/tudurom/windowchef
2 parents deff1c3 + a22734b commit 9496a98

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

wm.c

+4-14
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ static struct win_position get_window_position(uint32_t, struct client *);
117117
static bool is_overlapping(struct client *, struct client *);
118118
static bool is_in_valid_direction(uint32_t, float, float);
119119
static bool is_in_cardinal_direction(uint32_t , struct client *, struct client *);
120-
static void save_original_size(struct client *);
121120
static xcb_atom_t get_atom(char *);
122121
static void update_desktop_viewport(void);
123122
static bool get_pointer_location(xcb_window_t *, int16_t *, int16_t *);
@@ -1077,7 +1076,7 @@ maximize_window(struct client *client, int16_t mon_x, int16_t mon_y, uint16_t mo
10771076
/* maximized windows don't have borders */
10781077
values[0] = 0;
10791078
if (client->geom.width != mon_width || client->geom.height != mon_height)
1080-
save_original_size(client);
1079+
client->orig_geom = client->geom;
10811080
xcb_configure_window(conn, client->window, XCB_CONFIG_WINDOW_BORDER_WIDTH,
10821081
values);
10831082

@@ -1104,7 +1103,7 @@ hmaximize_window(struct client *client, int16_t mon_x, uint16_t mon_width)
11041103
unmaximize_window(client);
11051104

11061105
if (client->geom.width != mon_width)
1107-
save_original_size(client);
1106+
client->orig_geom = client->geom;
11081107
client->geom.x = mon_x + conf.gap_left;
11091108
client->geom.width = mon_width - conf.gap_left - conf.gap_right - 2 * conf.border_width;
11101109

@@ -1126,7 +1125,7 @@ vmaximize_window(struct client *client, int16_t mon_y, uint16_t mon_height)
11261125
unmaximize_window(client);
11271126

11281127
if (client->geom.height != mon_height)
1129-
save_original_size(client);
1128+
client->orig_geom = client->geom;
11301129

11311130
client->geom.y = mon_y + conf.gap_up;
11321131
client->geom.height = mon_height - conf.gap_up - conf.gap_down - 2 * conf.border_width;
@@ -1148,7 +1147,7 @@ monocle_window(struct client *client, int16_t mon_x, int16_t mon_y, uint16_t mon
11481147
if (is_maxed(client))
11491148
unmaximize_window(client);
11501149

1151-
save_original_size(client);
1150+
client->orig_geom = client->geom;
11521151

11531152
client->geom.x = mon_x + conf.gap_left;
11541153
client->geom.y = mon_y + conf.gap_up;
@@ -1565,15 +1564,6 @@ get_distance_between_windows(struct client *a, struct client *b)
15651564
return distance;
15661565
}
15671566

1568-
static void
1569-
save_original_size(struct client *client)
1570-
{
1571-
client->orig_geom.x = client->geom.x;
1572-
client->orig_geom.y = client->geom.y;
1573-
client->orig_geom.width = client->geom.width;
1574-
client->orig_geom.height = client->geom.height;
1575-
}
1576-
15771567
/*
15781568
* Get atom by name.
15791569
*/

0 commit comments

Comments
 (0)