Re:2012 Wine bug "Drawing in Photoshop CS5 is almost impossi...
by pjc50 on Wednesday December 20, 2017 @09:05AM
(#15969538)
The architecture is inherently different: it works fine in Windows because there's only one canonical key state and the operating system is looking after it.
Wine, on the other hand, is running within X Windows, and the canonical key state belongs to X. It's in a different process and it might even be on a different computer. So either they have to poll it (slowly), arrange for asynchronous notifications (may not be possible and undoubtedly has similar conflicts with synchronous access), or poll it a limited amount and then cache it.
The whole point of Wine is adapting one API to a fundamentally different one. It is the added layer of complexity.
Edit: another discussion suggests the X by design does not allow an application to see keystrokes aimed at another window, nor is there a global hook mechanism.
Wine, on the other hand, is running within X Windows, and the canonical key state belongs to X. It's in a different process and it might even be on a different computer. So either they have to poll it (slowly), arrange for asynchronous notifications (may not be possible and undoubtedly has similar conflicts with synchronous access), or poll it a limited amount and then cache it.
The whole point of Wine is adapting one API to a fundamentally different one. It is the added layer of complexity.
Edit: another discussion suggests the X by design does not allow an application to see keystrokes aimed at another window, nor is there a global hook mechanism.
https://bugs.winehq.org/show_bug.cgi?id=5623