Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2016-12-01 12:29:46 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2016-12-01 12:29:46 +0300
commitff2a74906a7b70625a4e941c6a805f7734491204 (patch)
tree562f5ccdd9f4e377d20fe22eadca48201924b4b3 /intern/ghost
parent73c1c92c0e86ce1b5a8abeaa16be2bf2c259412b (diff)
parent58877d6d082d82185ca611b704364168e5984bd7 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp2
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.cpp24
2 files changed, 17 insertions, 9 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index 1f49adecdef..58aa0b87045 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -353,7 +353,7 @@ GHOST_WindowWin32::~GHOST_WindowWin32()
// Release our reference of the DropTarget and it will delete itself eventually.
m_dropTarget->Release();
}
-
+ ::SetWindowLongPtr(m_hWnd, GWLP_USERDATA, NULL);
::DestroyWindow(m_hWnd);
m_hWnd = 0;
}
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index a02117d517e..992200a0b09 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -861,24 +861,32 @@ void GHOST_WindowX11::icccmSetState(int state)
int GHOST_WindowX11::icccmGetState(void) const
{
- Atom *prop_ret;
+ struct {
+ CARD32 state;
+ XID icon;
+ } *prop_ret;
unsigned long bytes_after, num_ret;
Atom type_ret;
- int format_ret, st;
+ int ret, format_ret;
+ CARD32 st;
prop_ret = NULL;
- st = XGetWindowProperty(
+ ret = XGetWindowProperty(
m_display, m_window, m_system->m_atom.WM_STATE, 0, 2,
False, m_system->m_atom.WM_STATE, &type_ret,
&format_ret, &num_ret, &bytes_after, ((unsigned char **)&prop_ret));
- if ((st == Success) && (prop_ret) && (num_ret == 2))
- st = prop_ret[0];
- else
+ if ((ret == Success) && (prop_ret != NULL) && (num_ret == 2)) {
+ st = prop_ret->state;
+ }
+ else {
st = NormalState;
+ }
- if (prop_ret)
+ if (prop_ret) {
XFree(prop_ret);
- return (st);
+ }
+
+ return st;
}
void GHOST_WindowX11::netwmMaximized(bool set)