Skip to content

Commit

Permalink
Always send ConfigureNotifies
Browse files Browse the repository at this point in the history
ICCCM specifies when the WM has to send a ConfigureNotify. Java does not care
and wants one all the time. Meh.

Fixes: #248
Signed-off-by: Uli Schlachter <psychon@znc.in>
  • Loading branch information
psychon committed Feb 4, 2016
1 parent 1943793 commit cd63cab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion objects/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -819,13 +819,18 @@ client_resize_do(client_t *c, area_t geometry, bool force_notice)
lua_State *L = globalconf_get_lua_State();
bool send_notice = force_notice;
bool hide_titlebars = c->fullscreen;
bool java_is_broken = true;

This comment has been minimized.

Copy link
@blueyed

blueyed Feb 4, 2016

Member

Haha.. :)
Could this somehow detect a (broken) Java client?

If I understand it correctly, it now does extra things all the time - to work around the Java Hulk?!

This comment has been minimized.

Copy link
@psychon

psychon Feb 5, 2016

Author Member

We could hardcode magic based on e.g. WM_CLASS, but that only gets us more complicated code. Well-behaving clients won't mind an extra ConfigureNotify and these don't cause much "traffic" either.

That's why I chose to be a bit passive aggressive and just always do it like this.

TL;DR: No downsides doing it like this and it's the simplest patch possible.


screen_t *new_screen = c->screen;
if(!screen_coord_in_screen(new_screen, geometry.x, geometry.y))
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 */
Expand Down Expand Up @@ -858,7 +863,6 @@ client_resize_do(client_t *c, area_t geometry, bool force_notice)
(uint32_t[]) { real_geometry.x, real_geometry.y, real_geometry.width, real_geometry.height });

if(send_notice)
/* We are moving without changing the size, see ICCCM 4.2.3 */
client_send_configure(c);

client_restore_enterleave_events();
Expand Down

0 comments on commit cd63cab

Please sign in to comment.