* Some problems that leads to shutdown crashes in X11 are fixed 4.x-dev

Sun, 20 Dec 2020 10:48:02 +0200

author
cemkalyoncu
date
Sun, 20 Dec 2020 10:48:02 +0200
branch
4.x-dev
changeset 1523
da86720e9360
parent 1522
723fc72c27b4
child 1524
22b7b47127d4

* Some problems that leads to shutdown crashes in X11 are fixed

Source/Gorgon/Main.cpp file | annotate | diff | comparison | revisions
Source/Gorgon/WindowManager/X11/Window.cpp file | annotate | diff | comparison | revisions
Source/Gorgon/WindowManager/X11/X11.cpp file | annotate | diff | comparison | revisions
--- a/Source/Gorgon/Main.cpp	Sat Dec 19 01:47:19 2020 +0100
+++ b/Source/Gorgon/Main.cpp	Sun Dec 20 10:48:02 2020 +0200
@@ -102,8 +102,6 @@
         }
         
         once.clear();
-
-		OS::processmessages();
 	}
 
 	void Render() {
--- a/Source/Gorgon/WindowManager/X11/Window.cpp	Sat Dec 19 01:47:19 2020 +0100
+++ b/Source/Gorgon/WindowManager/X11/Window.cpp	Sun Dec 20 10:48:02 2020 +0200
@@ -641,6 +641,9 @@
     }
  
     void Window::processmessages() {
+        if(data->handle == 0)
+            return;
+        
         XEvent event;
         
         mouselocation = WindowManager::GetMousePosition(data);
@@ -664,7 +667,7 @@
                         
                         if(allow) {
                             Close();
-                            break;
+                            return;
                         }
                     }
                     else if(event.xclient.message_type==WindowManager::XdndEnter) {
--- a/Source/Gorgon/WindowManager/X11/X11.cpp	Sat Dec 19 01:47:19 2020 +0100
+++ b/Source/Gorgon/WindowManager/X11/X11.cpp	Sun Dec 20 10:48:02 2020 +0200
@@ -274,6 +274,7 @@
     void Icon::Destroy() {
         if(data->data) {
             delete data->data;
+            data->data = nullptr;
             data->w = 0;
             data->h = 0;
         }

mercurial