From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winex11.drv/window.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 58786d962cf..4992d8c42c4 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1211,9 +1211,10 @@ static void update_net_wm_fullscreen_monitors( struct x11drv_win_data *data )
static void window_set_net_wm_state( struct x11drv_win_data *data, UINT new_state ) { - UINT i, count; + UINT i, count, old_state = data->pending_state.net_wm_state;
if (!data->whole_window) return; /* no window, nothing to update */ + if (old_state == new_state) return; /* states are the same, nothing to update */
if (!data->mapped) /* set the _NET_WM_STATE atom directly */ { @@ -1250,6 +1251,8 @@ static void window_set_net_wm_state( struct x11drv_win_data *data, UINT new_stat
for (i = 0; i < NB_NET_WM_STATES; i++) { + if (!((old_state ^ new_state) & (1 << i))) continue; + xev.xclient.data.l[0] = (new_state & (1 << i)) ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE; xev.xclient.data.l[1] = X11DRV_Atoms[net_wm_state_atoms[i] - FIRST_XATOM]; xev.xclient.data.l[2] = ((net_wm_state_atoms[i] == XATOM__NET_WM_STATE_MAXIMIZED_VERT) ?