On Fri Oct 6 08:31:13 2023 +0000, Rémi Bernon wrote:
I think you should probably try to reproduce the winex11 `update_net_wm_states` logic here as, although not perfect, it has been much tested already:
style = NtUserGetWindowLongW( data->hwnd, GWL_STYLE ); if (style & WS_MINIMIZE) new_state |= data->net_wm_state & ((1 << NET_WM_STATE_FULLSCREEN)|(1 << NET_WM_STATE_MAXIMIZED)); if (NtUserIsWindowRectFullScreen( &data->whole_rect )) { if ((style & WS_MAXIMIZE) && (style & WS_CAPTION) == WS_CAPTION) new_state |= (1 << NET_WM_STATE_MAXIMIZED); else if (!(style & WS_MINIMIZE)) new_state |= (1 << NET_WM_STATE_FULLSCREEN); } else if (style & WS_MAXIMIZE) new_state |= (1 << NET_WM_STATE_MAXIMIZED);
Where I believe `whole_rect` is the same as `visible_rect`. For instance, setting `WS_MINIMIZE` is not supposed to clear the maximized / fullscreen state (and I highly suspect some applications expect this).
I will look into this, thanks for the pointer!