Piotr Caban piotr@codeweavers.com writes:
- hwnd = CreateWindowExA( WS_EX_LAYERED, "MainWindowClass", "layered window",
WS_POPUP | WS_VISIBLE, 100, 100, 200, 200, 0, 0, 0, NULL );
- ok( hwnd != 0, "failed to create layered window\n" );
- ok(GetFocus() == hwnd, "GetFocus() = %p, expected %p\n", GetFocus(), hwnd);
- flush_events(TRUE);
- todo_wine ok(GetFocus() == hwnd, "GetFocus() = %p, expected %p\n", GetFocus(), hwnd);
What problem are you trying to demonstrate? It works fine here:
../../../tools/runtest -q -P wine -T ../../.. -M user32.dll -p user32_test.exe.so win && touch win.ok win.c:6566: Test succeeded inside todo block: GetFocus() = 0x8200f6, expected 0x8200f6 Makefile:609: recipe for target 'win.ok' failed
I assume this test is for the same problem why I had to add the event flushing to the dinput tests. Depending on the window manager the focus is somehow lost when a X11 event arrives (I think it was ConfigureNotify, but not sure anymore).
2015-11-11 15:24 GMT+01:00 Alexandre Julliard julliard@winehq.org:
Piotr Caban piotr@codeweavers.com writes:
- hwnd = CreateWindowExA( WS_EX_LAYERED, "MainWindowClass", "layered
window",
WS_POPUP | WS_VISIBLE, 100, 100, 200, 200,
0, 0, 0, NULL );
- ok( hwnd != 0, "failed to create layered window\n" );
- ok(GetFocus() == hwnd, "GetFocus() = %p, expected %p\n",
GetFocus(), hwnd);
- flush_events(TRUE);
- todo_wine ok(GetFocus() == hwnd, "GetFocus() = %p, expected %p\n",
GetFocus(), hwnd);
What problem are you trying to demonstrate? It works fine here:
../../../tools/runtest -q -P wine -T ../../.. -M user32.dll -p user32_test.exe.so win && touch win.ok win.c:6566: Test succeeded inside todo block: GetFocus() = 0x8200f6, expected 0x8200f6 Makefile:609: recipe for target 'win.ok' failed
-- Alexandre Julliard julliard@winehq.org
On 11/11/15 15:24, Alexandre Julliard wrote:
Piotr Caban piotr@codeweavers.com writes:
- hwnd = CreateWindowExA( WS_EX_LAYERED, "MainWindowClass", "layered window",
WS_POPUP | WS_VISIBLE, 100, 100, 200, 200, 0, 0, 0, NULL );
- ok( hwnd != 0, "failed to create layered window\n" );
- ok(GetFocus() == hwnd, "GetFocus() = %p, expected %p\n", GetFocus(), hwnd);
- flush_events(TRUE);
- todo_wine ok(GetFocus() == hwnd, "GetFocus() = %p, expected %p\n", GetFocus(), hwnd);
What problem are you trying to demonstrate? It works fine here:
../../../tools/runtest -q -P wine -T ../../.. -M user32.dll -p user32_test.exe.so win && touch win.ok win.c:6566: Test succeeded inside todo block: GetFocus() = 0x8200f6, expected 0x8200f6 Makefile:609: recipe for target 'win.ok' failed
I didn't think about it well. This behavior is window manager dependent. The test fails in similar way here if run in virtual desktop.
On my computer when a layered window is created it gets focus, later while flushing events it looses focus because of WM_TAKE_FOCUS event. After that when application calls UpdateLayeredWindow function window manager generates another event that gives focus back to layered window (I'm using KDE).
Because of that table resizing is not working in Office 2013 for me.
Piotr Caban piotr@codeweavers.com writes:
I didn't think about it well. This behavior is window manager dependent. The test fails in similar way here if run in virtual desktop.
On my computer when a layered window is created it gets focus, later while flushing events it looses focus because of WM_TAKE_FOCUS event. After that when application calls UpdateLayeredWindow function window manager generates another event that gives focus back to layered window (I'm using KDE).
Yes, the window manager is free to do what it wants with the focus of top-level windows, that's not something we control. If the issue is specific to layered windows, it's probably because we have to destroy and recreate the window to switch visuals, which may cause the window manager to reassign focus.