Remove an obsolete argument to client_resize_do()
Thanks to Java being broken, the function always sends a notice anyway. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
25f2b03490
commit
4d9bbf0ba6
|
@ -757,7 +757,7 @@
|
|||
|
||||
static area_t titlebar_get_area(client_t *c, client_titlebar_t bar);
|
||||
static drawable_t *titlebar_get_drawable(lua_State *L, client_t *c, int cl_idx, client_titlebar_t bar);
|
||||
static void client_resize_do(client_t *c, area_t geometry, bool force_notice);
|
||||
static void client_resize_do(client_t *c, area_t geometry);
|
||||
|
||||
/** Collect a client.
|
||||
* \param L The Lua VM state.
|
||||
|
@ -1148,8 +1148,8 @@ border_width_callback(client_t *c, uint16_t old_width, uint16_t new_width)
|
|||
&diff_x, &diff_y);
|
||||
geometry.x += diff_x;
|
||||
geometry.y += diff_y;
|
||||
/* force_notice = true -> inform client about changes */
|
||||
client_resize_do(c, geometry, true);
|
||||
/* inform client about changes */
|
||||
client_resize_do(c, geometry);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1498,25 +1498,15 @@ client_apply_size_hints(client_t *c, area_t geometry)
|
|||
}
|
||||
|
||||
static void
|
||||
client_resize_do(client_t *c, area_t geometry, bool force_notice)
|
||||
client_resize_do(client_t *c, area_t geometry)
|
||||
{
|
||||
lua_State *L = globalconf_get_lua_State();
|
||||
bool send_notice = force_notice;
|
||||
bool hide_titlebars = c->fullscreen;
|
||||
bool java_is_broken = true;
|
||||
|
||||
screen_t *new_screen = c->screen;
|
||||
if(!screen_area_in_screen(new_screen, geometry))
|
||||
new_screen = screen_getbycoord(geometry.x, geometry.y);
|
||||
|
||||
if(c->geometry.width == geometry.width
|
||||
&& c->geometry.height == geometry.height)
|
||||
/* We are moving without changing the size, see ICCCM 4.2.3 */
|
||||
send_notice = true;
|
||||
if(java_is_broken)
|
||||
/* Java strong. Java Hulk. Java make own rules! */
|
||||
send_notice = true;
|
||||
|
||||
/* Also store geometry including border */
|
||||
area_t old_geometry = c->geometry;
|
||||
c->geometry = geometry;
|
||||
|
@ -1546,8 +1536,8 @@ client_resize_do(client_t *c, area_t geometry, bool force_notice)
|
|||
XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT,
|
||||
(uint32_t[]) { real_geometry.x, real_geometry.y, real_geometry.width, real_geometry.height });
|
||||
|
||||
if(send_notice)
|
||||
client_send_configure(c);
|
||||
/* ICCCM 4.2.3 says something else, but Java always needs this... */
|
||||
client_send_configure(c);
|
||||
|
||||
client_restore_enterleave_events();
|
||||
|
||||
|
@ -1629,7 +1619,7 @@ client_resize(client_t *c, area_t geometry, bool honor_hints)
|
|||
|| c->geometry.width != geometry.width
|
||||
|| c->geometry.height != geometry.height)
|
||||
{
|
||||
client_resize_do(c, geometry, false);
|
||||
client_resize_do(c, geometry);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1799,7 +1789,7 @@ client_set_fullscreen(lua_State *L, int cidx, bool s)
|
|||
luaA_object_emit_signal(L, abs_cidx, "request::geometry", 1);
|
||||
luaA_object_emit_signal(L, abs_cidx, "property::fullscreen", 0);
|
||||
/* Force a client resize, so that titlebars get shown/hidden */
|
||||
client_resize_do(c, c->geometry, true);
|
||||
client_resize_do(c, c->geometry);
|
||||
stack_windows();
|
||||
}
|
||||
}
|
||||
|
@ -2631,7 +2621,7 @@ titlebar_resize(lua_State *L, int cidx, client_t *c, client_titlebar_t bar, int
|
|||
}
|
||||
|
||||
c->titlebar[bar].size = size;
|
||||
client_resize_do(c, geometry, true);
|
||||
client_resize_do(c, geometry);
|
||||
|
||||
luaA_object_emit_signal(L, cidx, property_name, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue