summaryrefslogtreecommitdiff
path: root/platform/x11/os_x11.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-08-30 23:36:46 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-08-30 23:36:46 -0300
commitcf57a654d7d09fe169455ffc2049cd4bfec660f3 (patch)
tree3b72d5e7d8b5c8eddddef09b924546c60c9c200d /platform/x11/os_x11.cpp
parent2d8866574dd2c06ac03e7055642b917a0a3c6dac (diff)
new editor settings customization of where to run the game from the editor
Diffstat (limited to 'platform/x11/os_x11.cpp')
-rw-r--r--platform/x11/os_x11.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 16632c6627..51f4392eb4 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -441,6 +441,7 @@ void OS_X11::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
net_wm_icon = XInternAtom(x11_display, "_NET_WM_ICON", False);
+
//printf("got map notify\n");
}
@@ -671,17 +672,24 @@ void OS_X11::set_current_screen(int p_screen) {
}
Point2 OS_X11::get_screen_position(int p_screen) const {
+
// Using Xinerama Extension
int event_base, error_base;
const Bool ext_okay = XineramaQueryExtension(x11_display, &event_base, &error_base);
- if( !ext_okay ) return Point2i(0,0);
+ if( !ext_okay ) {
+ return Point2i(0,0);
+ }
int count;
XineramaScreenInfo* xsi = XineramaQueryScreens(x11_display, &count);
- if( p_screen >= count ) return Point2i(0,0);
+ if( p_screen >= count ) {
+ return Point2i(0,0);
+ }
Point2i position = Point2i(xsi[p_screen].x_org, xsi[p_screen].y_org);
+
XFree(xsi);
+
return position;
}
@@ -715,6 +723,7 @@ Point2 OS_X11::get_window_position() const {
void OS_X11::set_window_position(const Point2& p_position) {
// Using EWMH -- Extended Window Manager Hints
// to get the size of the decoration
+#if 0
Atom property = XInternAtom(x11_display,"_NET_FRAME_EXTENTS", True);
Atom type;
int format;
@@ -757,6 +766,9 @@ void OS_X11::set_window_position(const Point2& p_position) {
top -= screen_position.y;
XMoveWindow(x11_display,x11_window,p_position.x - left,p_position.y - top);
+#else
+ XMoveWindow(x11_display,x11_window,p_position.x,p_position.y);
+#endif
}
Size2 OS_X11::get_window_size() const {