Merge pull request #28784 from bruvzg/x11_check_extents_atoms
X11: Check if "_NET_FRAME_EXTENTS" atom is supported.
This commit is contained in:
commit
7112a45d99
|
@ -1184,6 +1184,7 @@ void OS_X11::set_window_position(const Point2 &p_position) {
|
|||
//exclude window decorations
|
||||
XSync(x11_display, False);
|
||||
Atom prop = XInternAtom(x11_display, "_NET_FRAME_EXTENTS", True);
|
||||
if (prop != None) {
|
||||
Atom type;
|
||||
int format;
|
||||
unsigned long len;
|
||||
|
@ -1198,6 +1199,7 @@ void OS_X11::set_window_position(const Point2 &p_position) {
|
|||
XFree(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
XMoveWindow(x11_display, x11_window, p_position.x - x, p_position.y - y);
|
||||
update_real_mouse_position();
|
||||
}
|
||||
|
@ -1215,6 +1217,7 @@ Size2 OS_X11::get_real_window_size() const {
|
|||
int w = xwa.width;
|
||||
int h = xwa.height;
|
||||
Atom prop = XInternAtom(x11_display, "_NET_FRAME_EXTENTS", True);
|
||||
if (prop != None) {
|
||||
Atom type;
|
||||
int format;
|
||||
unsigned long len;
|
||||
|
@ -1228,6 +1231,7 @@ Size2 OS_X11::get_real_window_size() const {
|
|||
}
|
||||
XFree(data);
|
||||
}
|
||||
}
|
||||
return Size2(w, h);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue