-
Notifications
You must be signed in to change notification settings - Fork 1.2k
No way to avoid focus stealing on X11. #1160
Copy link
Copy link
Closed
Labels
B - bugDang, that shouldn't have happenedDang, that shouldn't have happenedC - needs investigationIssue must be confirmed and researchedIssue must be confirmed and researchedDS - x11Affects the X11 backend, or generally free Unix platformsAffects the X11 backend, or generally free Unix platforms
Description
There seems to be no way to map a window without focusing it. I've only tested this on X11, but it may be present on other platforms as well given there is no WindowBuilder option to disable the behaviour.
On X11, this code is the culprit:
winit/src/platform_impl/linux/x11/window.rs
Lines 353 to 358 in b03e589
| // Set visibility (map window) | |
| if window_attrs.visible { | |
| unsafe { | |
| (xconn.xlib.XMapRaised)(xconn.display, window.xwindow); | |
| } //.queue(); | |
| } |
XMapRaised pushes the window to the top of the stack as well as maps the window.
There should be an option to disable this behaviour and map the window normally with XMapWindow().
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
B - bugDang, that shouldn't have happenedDang, that shouldn't have happenedC - needs investigationIssue must be confirmed and researchedIssue must be confirmed and researchedDS - x11Affects the X11 backend, or generally free Unix platformsAffects the X11 backend, or generally free Unix platforms