Mostly fix editor GUIs drifting in negative coords

I think some rounding in Wine is causing this issue, but then again
we're not supposed to send these ConfigureNotify events to the window
directly anyways.
This commit is contained in:
Robbert van der Helm
2020-12-26 16:30:25 +01:00
parent 47177ed889
commit db2cc5800a
3 changed files with 48 additions and 4 deletions
+11
View File
@@ -250,6 +250,17 @@ class Editor {
*/
const xcb_window_t topmost_window;
/**
* In `fix_local_coordinates()` we send a ConfigureNotify event to the Wine
* window with its screen coordinates. Because you're not supposed to do
* that directly, we're getting some strange behaviour on some plugins when
* the window gets dragged off screen to the left or the top. We perform a
* small workaround to mostly correct this issue. This flag indicates
* whether we have done this in the last call to `fix_local_coordinates()`,
* since we only only need to undo the changes made there once.
*/
mutable std::atomic_bool has_negative_coordinate_correction = false;
/**
* The atom corresponding to `_NET_ACTIVE_WINDOW`.
*/