winex11.drv: Add a some heuristics when to add a maximize or fullscreen hint
Dmitry Timoshkov
dmitry at codeweavers.com
Tue Mar 18 09:25:33 CDT 2008
Hello,
here is another attempt to fix a regression with fullscreen mode in IE.
Changelog:
winex11.drv: Add a some heuristics when to add a maximize or fullscreen hint.
---
dlls/winex11.drv/winpos.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c
index eed9eeb..25e643e 100644
--- a/dlls/winex11.drv/winpos.c
+++ b/dlls/winex11.drv/winpos.c
@@ -183,12 +183,16 @@ static void update_net_wm_states( Display *display, struct x11drv_win_data *data
if (!data->mapped) return;
style = GetWindowLongW( data->hwnd, GWL_STYLE );
- if (style & WS_MAXIMIZE) new_state |= (1 << NET_WM_STATE_MAXIMIZED);
-
- if (!(style & WS_MAXIMIZE) &&
- data->whole_rect.left <= 0 && data->whole_rect.right >= screen_width &&
+ if (data->whole_rect.left <= 0 && data->whole_rect.right >= screen_width &&
data->whole_rect.top <= 0 && data->whole_rect.bottom >= screen_height)
- new_state |= (1 << NET_WM_STATE_FULLSCREEN);
+ {
+ if ((style & WS_MAXIMIZE) && (style & WS_CAPTION) == WS_CAPTION)
+ new_state |= (1 << NET_WM_STATE_MAXIMIZED);
+ else
+ new_state |= (1 << NET_WM_STATE_FULLSCREEN);
+ }
+ else if (style & WS_MAXIMIZE)
+ new_state |= (1 << NET_WM_STATE_MAXIMIZED);
ex_style = GetWindowLongW( data->hwnd, GWL_EXSTYLE );
if (ex_style & WS_EX_TOPMOST)
--
1.5.4.3
More information about the wine-patches
mailing list