aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcutealien <cutealien@dfc29bdd-3216-0410-991c-e03cc46cb475>2020-12-22 21:30:35 +0000
committercutealien <cutealien@dfc29bdd-3216-0410-991c-e03cc46cb475>2020-12-22 21:30:35 +0000
commit1e6fe54cf528de179390e81dbd97c0884b30bdbf (patch)
treeab316cebae60a7768fda5951375f9644b4a2d770
parent124cc0be1ee3dcd188371e8a8a30862ea2feb4b1 (diff)
downloadirrlicht-1e6fe54cf528de179390e81dbd97c0884b30bdbf.tar.xz
Merging r6173 through r6176 from trunk to ogl-es branch
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
-rw-r--r--changes.txt1
-rw-r--r--source/Irrlicht/CIrrDeviceLinux.cpp14
-rw-r--r--source/Irrlicht/Makefile6
3 files changed, 9 insertions, 12 deletions
diff --git a/changes.txt b/changes.txt
index 808328d..5c87410 100644
--- a/changes.txt
+++ b/changes.txt
@@ -9,6 +9,7 @@ Changes in ogl-es (not yet released - will be merged with trunk at some point)
--------------------------
Changes in 1.9 (not yet released)
+- Slightly changed close window handling on X11 (optimized and avoids problems on some shells). Thanks @TheBrokenRail for a patch (was part of patch #322).
- Add getActiveColor functions to IGUIStaticText and IGUIButton (get currently used color).
- Add IGUIEnvironment::addToDeletionQueue to allow save removal of gui elements while iterating over them (like the same named function in ISceneManager).
- IGUIEnvironment::drawAll has now a parameter to allow disabling automatic resize to screensize. Makes it easier to use partial screens with full alignment support.
diff --git a/source/Irrlicht/CIrrDeviceLinux.cpp b/source/Irrlicht/CIrrDeviceLinux.cpp
index 34f0b2c..af54946 100644
--- a/source/Irrlicht/CIrrDeviceLinux.cpp
+++ b/source/Irrlicht/CIrrDeviceLinux.cpp
@@ -89,13 +89,12 @@ namespace
Atom X_ATOM_NETWM_MAXIMIZE_VERT;
Atom X_ATOM_NETWM_MAXIMIZE_HORZ;
Atom X_ATOM_NETWM_STATE;
+
+ Atom X_ATOM_WM_DELETE_WINDOW;
};
namespace irr
{
-
-const char wmDeleteWindow[] = "WM_DELETE_WINDOW";
-
//! constructor
CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param)
: CIrrDeviceStub(param),
@@ -489,9 +488,8 @@ bool CIrrDeviceLinux::createWindow()
XMapRaised(XDisplay, XWindow);
CreationParams.WindowId = (void*)XWindow;
- Atom wmDelete;
- wmDelete = XInternAtom(XDisplay, wmDeleteWindow, True);
- XSetWMProtocols(XDisplay, XWindow, &wmDelete, 1);
+ X_ATOM_WM_DELETE_WINDOW = XInternAtom(XDisplay, "WM_DELETE_WINDOW", True);
+ XSetWMProtocols(XDisplay, XWindow, &X_ATOM_WM_DELETE_WINDOW, 1);
if (CreationParams.Fullscreen)
{
XSetInputFocus(XDisplay, XWindow, RevertToParent, CurrentTime);
@@ -1046,8 +1044,7 @@ bool CIrrDeviceLinux::run()
case ClientMessage:
{
- char *atom = XGetAtomName(XDisplay, event.xclient.message_type);
- if (*atom == *wmDeleteWindow)
+ if (static_cast<Atom>(event.xclient.data.l[0]) == X_ATOM_WM_DELETE_WINDOW && X_ATOM_WM_DELETE_WINDOW != None)
{
os::Printer::log("Quit message received.", ELL_INFORMATION);
Close = true;
@@ -1060,7 +1057,6 @@ bool CIrrDeviceLinux::run()
irrevent.UserEvent.UserData2 = static_cast<size_t>(event.xclient.data.l[1]);
postEventFromUser(irrevent);
}
- XFree(atom);
}
break;
diff --git a/source/Irrlicht/Makefile b/source/Irrlicht/Makefile
index c967d24..d637b55 100644
--- a/source/Irrlicht/Makefile
+++ b/source/Irrlicht/Makefile
@@ -94,15 +94,15 @@ endif
ifdef EMSCRIPTEN
CXXFLAGS += -std=gnu++11 -U__STRICT_ANSI__
ifndef NDEBUG
- CFLAGS := -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES
+ CFLAGS := -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES -DPNG_ARM_NEON_OPT=0
else
- CFLAGS := -O3 -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES
+ CFLAGS := -O3 -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES -DPNG_ARM_NEON_OPT=0
endif
ifdef WASM
CXXFLAGS += -s WASM=1
endif
else
- CFLAGS := -O3 -fexpensive-optimizations -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES
+ CFLAGS := -O3 -fexpensive-optimizations -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES -DPNG_ARM_NEON_OPT=0
endif
sharedlib sharedlib_osx: CXXFLAGS += -fPIC