diff options
author | Andreas Holzammer <andreas.holzammer.qnx@kdab.com> | 2013-08-20 09:35:21 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-21 16:39:55 +0200 |
commit | 5680484476d7d60b85ac64b017edd97116048525 (patch) | |
tree | ff94640d508bdb64bdec50868eba025127536dad /src/plugins/platforms/qnx/qqnxrootwindow.cpp | |
parent | 9d0b190f4b27e64d0e5d532c6a819dae076c3274 (diff) |
[QNX]Fix transparencies
It is not guaranteed that buffers are cleared when they
are allocated. So don't use a buffer for the root window,
and clear buffers for the actual content.
Change-Id: I42939baec03fa05968c83bbf2739ab8d1d70c8be
Reviewed-by: Matt Hoosier <matt.hoosier@garmin.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxrootwindow.cpp')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxrootwindow.cpp | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/src/plugins/platforms/qnx/qqnxrootwindow.cpp b/src/plugins/platforms/qnx/qqnxrootwindow.cpp index ff5866d1b7..b3f5c87176 100644 --- a/src/plugins/platforms/qnx/qqnxrootwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxrootwindow.cpp @@ -188,35 +188,8 @@ void QQnxRootWindow::makeTranslucent() int result; errno = 0; - result = screen_destroy_window_buffers(m_window); - if (result != 0) { - qFatal("QQnxRootWindow: failed to destroy window buffer, errno=%d", errno); - } - - QRect geometry = m_screen->geometry(); - errno = 0; - int val[2]; - val[0] = geometry.width(); - val[1] = geometry.height(); - result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_BUFFER_SIZE, val); - if (result != 0) { - qFatal("QQnxRootWindow: failed to set window buffer size, errno=%d", errno); - } - - errno = 0; - result = screen_create_window_buffers(m_window, 1); - if (result != 0) { - qFatal("QQNX: failed to create window buffer, errno=%d", errno); - } - - // Install an alpha channel on the root window. - // - // This is necessary in order to avoid interfering with any particular - // toplevel widget's QQnxWindow window instance from showing transparent - // if it desires. - errno = 0; - val[0] = SCREEN_TRANSPARENCY_SOURCE_OVER; - result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_TRANSPARENCY, val); + const int val = SCREEN_TRANSPARENCY_DISCARD; + result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_TRANSPARENCY, &val); if (result != 0) { qFatal("QQnxRootWindow: failed to set window transparency, errno=%d", errno); } |