diff options
Diffstat (limited to 'platform/x11')
-rw-r--r-- | platform/x11/export/export.cpp | 20 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 14 |
2 files changed, 2 insertions, 32 deletions
diff --git a/platform/x11/export/export.cpp b/platform/x11/export/export.cpp index 2535517c74..59b1a44247 100644 --- a/platform/x11/export/export.cpp +++ b/platform/x11/export/export.cpp @@ -28,6 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "export.h" + #include "editor/editor_export.h" #include "platform/x11/logo.gen.h" #include "scene/resources/texture.h" @@ -51,23 +52,4 @@ void register_x11_exporter() { platform->set_os_name("X11"); EditorExport::get_singleton()->add_export_platform(platform); - -#if 0 - Image img(_x11_logo); - Ref<ImageTexture> logo = memnew( ImageTexture ); - logo->create_from_image(img); - - { - Ref<EditorExportPlatformPC> exporter = Ref<EditorExportPlatformPC>( memnew(EditorExportPlatformPC) ); - exporter->set_binary_extension(""); - exporter->set_release_binary32("linux_x11_32_release"); - exporter->set_debug_binary32("linux_x11_32_debug"); - exporter->set_release_binary64("linux_x11_64_release"); - exporter->set_debug_binary64("linux_x11_64_debug"); - exporter->set_name("Linux X11"); - exporter->set_logo(logo); - EditorImportExport::get_singleton()->add_export_platform(exporter); - } - -#endif } diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index a4fe2f2a64..2d33d25773 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -1601,8 +1601,7 @@ void OS_X11::process_xevents() { Point2i pos(event.xmotion.x, event.xmotion.y); if (mouse_mode == MOUSE_MODE_CAPTURED) { -#if 1 - //Vector2 c = Point2i(current_videomode.width/2,current_videomode.height/2); + if (pos == Point2i(current_videomode.width / 2, current_videomode.height / 2)) { //this sucks, it's a hack, etc and is a little inaccurate, etc. //but nothing I can do, X11 sucks. @@ -1615,17 +1614,6 @@ void OS_X11::process_xevents() { pos = last_mouse_pos + (pos - center); center = new_center; do_mouse_warp = window_has_focus; // warp the cursor if we're focused in -#else - //Dear X11, thanks for making my life miserable - - center.x = current_videomode.width / 2; - center.y = current_videomode.height / 2; - pos = last_mouse_pos + (pos - center); - if (pos == last_mouse_pos) - break; - XWarpPointer(x11_display, None, x11_window, - 0, 0, 0, 0, (int)center.x, (int)center.y); -#endif } if (!last_mouse_pos_valid) { |