]> git.lizzy.rs Git - irrlicht.git/commitdiff
Merging r6173 through r6176 from trunk to ogl-es branch
authorcutealien <cutealien@dfc29bdd-3216-0410-991c-e03cc46cb475>
Tue, 22 Dec 2020 21:30:35 +0000 (21:30 +0000)
committercutealien <cutealien@dfc29bdd-3216-0410-991c-e03cc46cb475>
Tue, 22 Dec 2020 21:30:35 +0000 (21:30 +0000)
Also adding -DPNG_ARM_NEON_OPT=0 to other places in Makefile as we don't have arm optimization for neon currently in our png lib.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6177 dfc29bdd-3216-0410-991c-e03cc46cb475

changes.txt
source/Irrlicht/CIrrDeviceLinux.cpp
source/Irrlicht/Makefile

index 808328dd2aaa5eb9a5ddc251181f187bbe4445ed..5c87410154437660b4b4498213b2482123d8d966 100644 (file)
@@ -9,6 +9,7 @@ Changes in ogl-es (not yet released - will be merged with trunk at some point)
 \r
 --------------------------\r
 Changes in 1.9 (not yet released)\r
+- Slightly changed close window handling on X11 (optimized and avoids problems on some shells). Thanks @TheBrokenRail for a patch (was part of patch #322).\r
 - Add getActiveColor functions to IGUIStaticText and IGUIButton (get currently used color).\r
 - Add IGUIEnvironment::addToDeletionQueue to allow save removal of gui elements while iterating over them (like the same named function in ISceneManager).\r
 - IGUIEnvironment::drawAll has now a parameter to allow disabling automatic resize to screensize. Makes it easier to use partial screens with full alignment support.\r
index 34f0b2cd5dcdb7285740a313e1b93196ffc429aa..af54946adda5f9e0dc785126bed955e33d4ac68d 100644 (file)
@@ -89,13 +89,12 @@ namespace
        Atom X_ATOM_NETWM_MAXIMIZE_VERT;\r
        Atom X_ATOM_NETWM_MAXIMIZE_HORZ;\r
        Atom X_ATOM_NETWM_STATE;\r
+\r
+       Atom X_ATOM_WM_DELETE_WINDOW;\r
 };\r
 \r
 namespace irr\r
 {\r
-\r
-const char wmDeleteWindow[] = "WM_DELETE_WINDOW";\r
-\r
 //! constructor\r
 CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param)\r
        : CIrrDeviceStub(param),\r
@@ -489,9 +488,8 @@ bool CIrrDeviceLinux::createWindow()
 \r
                XMapRaised(XDisplay, XWindow);\r
                CreationParams.WindowId = (void*)XWindow;\r
-               Atom wmDelete;\r
-               wmDelete = XInternAtom(XDisplay, wmDeleteWindow, True);\r
-               XSetWMProtocols(XDisplay, XWindow, &wmDelete, 1);\r
+               X_ATOM_WM_DELETE_WINDOW = XInternAtom(XDisplay, "WM_DELETE_WINDOW", True);\r
+               XSetWMProtocols(XDisplay, XWindow, &X_ATOM_WM_DELETE_WINDOW, 1);\r
                if (CreationParams.Fullscreen)\r
                {\r
                        XSetInputFocus(XDisplay, XWindow, RevertToParent, CurrentTime);\r
@@ -1046,8 +1044,7 @@ bool CIrrDeviceLinux::run()
 \r
                        case ClientMessage:\r
                                {\r
-                                       char *atom = XGetAtomName(XDisplay, event.xclient.message_type);\r
-                                       if (*atom == *wmDeleteWindow)\r
+                                       if (static_cast<Atom>(event.xclient.data.l[0]) == X_ATOM_WM_DELETE_WINDOW && X_ATOM_WM_DELETE_WINDOW != None)\r
                                        {\r
                                                os::Printer::log("Quit message received.", ELL_INFORMATION);\r
                                                Close = true;\r
@@ -1060,7 +1057,6 @@ bool CIrrDeviceLinux::run()
                                                irrevent.UserEvent.UserData2 = static_cast<size_t>(event.xclient.data.l[1]);\r
                                                postEventFromUser(irrevent);\r
                                        }\r
-                                       XFree(atom);\r
                                }\r
                                break;\r
 \r
index c967d24764d197d412a1a503bf7a75e5c8c3c4ae..d637b5536ecc8cd26462c6ed0010a35c36296590 100644 (file)
@@ -94,15 +94,15 @@ endif
 ifdef EMSCRIPTEN\r
   CXXFLAGS += -std=gnu++11 -U__STRICT_ANSI__\r
   ifndef NDEBUG\r
-    CFLAGS := -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES\r
+    CFLAGS := -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES -DPNG_ARM_NEON_OPT=0\r
   else\r
-    CFLAGS := -O3 -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES\r
+    CFLAGS := -O3 -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES -DPNG_ARM_NEON_OPT=0\r
   endif\r
   ifdef WASM\r
     CXXFLAGS += -s WASM=1\r
   endif  \r
 else\r
-  CFLAGS := -O3 -fexpensive-optimizations -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES\r
+  CFLAGS := -O3 -fexpensive-optimizations -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES -DPNG_ARM_NEON_OPT=0\r
 endif\r
 \r
 sharedlib sharedlib_osx: CXXFLAGS += -fPIC\r