summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorRiku Palomäki <riku@hyperkuutio.fi>2009-07-03 09:28:07 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-07-03 09:30:12 (GMT)
commit88a0857ac76c803d4f88204fe74448e140bbf300 (patch)
tree61aab59ddec032e763dbc34631d19af1bd906835 /src/gui/kernel
parentd64d961c7242d22a4d71b376e9dcbbb3a7061a9e (diff)
downloadQt-88a0857ac76c803d4f88204fe74448e140bbf300.zip
Qt-88a0857ac76c803d4f88204fe74448e140bbf300.tar.gz
Qt-88a0857ac76c803d4f88204fe74448e140bbf300.tar.bz2
Fix QX11Embed* with x86_64 by reading prop_return as long.
Even though the _XEMBED_INFO property uses 32 bit values, prop_return has 64-bit padded values in 64-bit applications, see man XChangeProperty. Without this fix the XEMBED client will read XEMBED_MAPPED wrong and unmap (hide) itself. Merge-request: 797 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qx11embed_x11.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/kernel/qx11embed_x11.cpp b/src/gui/kernel/qx11embed_x11.cpp
index 3ddde1b..659331f 100644
--- a/src/gui/kernel/qx11embed_x11.cpp
+++ b/src/gui/kernel/qx11embed_x11.cpp
@@ -826,7 +826,7 @@ bool QX11EmbedWidget::x11Event(XEvent *event)
&actual_format_return, &nitems_return,
&bytes_after_return, &prop_return) == Success) {
if (nitems_return > 1) {
- if (((int * )prop_return)[1] & XEMBED_MAPPED) {
+ if (((long * )prop_return)[1] & XEMBED_MAPPED) {
XMapWindow(x11Info().display(), internalWinId());
} else {
XUnmapWindow(x11Info().display(), internalWinId());
@@ -1670,9 +1670,9 @@ void QX11EmbedContainerPrivate::acceptClient(WId window)
// Clients with the _XEMBED_INFO property are XEMBED clients.
clientIsXEmbed = true;
- unsigned int *p = (unsigned int *)prop_return;
+ long *p = (long *)prop_return;
if (nitems_return >= 2)
- clientversion = p[0];
+ clientversion = (unsigned int)p[0];
}
XFree(prop_return);