You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Window management improvements.
[macOS] Fix transient windows not working in the full-screen mode. [macOS] Fix moving transient windows to the other screen than parent window. [macOS] Fix popup menu switch on hover. [macOS] Use content origin rect for windows position (to ensure `DS.mouse_get_position` is equal to `DS.window_get_position` + mouse position from the input events). [macOS] Fix incorrect input coordinates, when external display with different scaling in connected/disconnected. [macOS/Windows] Fix moving fullscreen windows between the screens. Add auto refocusing of the parent window, when the focused transient window is closed. Remove redundant `DS.mouse_get_absolute_position` function (returns mouse position in the screen coordinates, same as `DS.mouse_get_position`).
This commit is contained in:
@@ -365,21 +365,6 @@ void DisplayServerX11::mouse_warp_to_position(const Point2i &p_to) {
|
||||
}
|
||||
|
||||
Point2i DisplayServerX11::mouse_get_position() const {
|
||||
int root_x, root_y;
|
||||
int win_x, win_y;
|
||||
unsigned int mask_return;
|
||||
Window window_returned;
|
||||
|
||||
Bool result = XQueryPointer(x11_display, RootWindow(x11_display, DefaultScreen(x11_display)), &window_returned,
|
||||
&window_returned, &root_x, &root_y, &win_x, &win_y,
|
||||
&mask_return);
|
||||
if (result == True) {
|
||||
return Point2i(root_x, root_y);
|
||||
}
|
||||
return Point2i();
|
||||
}
|
||||
|
||||
Point2i DisplayServerX11::mouse_get_absolute_position() const {
|
||||
int number_of_screens = XScreenCount(x11_display);
|
||||
for (int i = 0; i < number_of_screens; i++) {
|
||||
Window root, child;
|
||||
|
||||
Reference in New Issue
Block a user