Module: wine Branch: master Commit: 79274bf0f57c6034ecf1b9eecd6bd2b242b56931 URL: http://source.winehq.org/git/wine.git/?a=commit;h=79274bf0f57c6034ecf1b9eecd...
Author: Dmitry Timoshkov dmitry@codeweavers.com Date: Tue Mar 18 22:25:33 2008 +0800
winex11.drv: Add a some heuristics when to add a maximize or fullscreen hint.
---
dlls/winex11.drv/winpos.c | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index eed9eeb..b444423 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -183,16 +183,23 @@ 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) + { new_state |= (1 << NET_WM_STATE_ABOVE); + ERR("switching window %p/%lx to STATE_ABOVE\n", data->hwnd, data->whole_window); + } if (ex_style & WS_EX_TOOLWINDOW) new_state |= (1 << NET_WM_STATE_SKIP_TASKBAR) | (1 << NET_WM_STATE_SKIP_PAGER);