forked from pool/libqt5-qtbase
26d10f1197
Update to 5.6.0 + xcb fixes OBS-URL: https://build.opensuse.org/request/show/391423 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=53
143 lines
6.1 KiB
Diff
143 lines
6.1 KiB
Diff
From 3c8b9236ed7a0b1284922097da875cc8baa1bb78 Mon Sep 17 00:00:00 2001
|
|
From: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
|
|
Date: Mon, 14 Mar 2016 10:07:20 +0100
|
|
Subject: [PATCH 11/16] xcb: Initialize all xcb_client_message_event_t members
|
|
before use
|
|
|
|
Change-Id: I01e4b69b138fd19fc7e67751d93adebc1326b2f9
|
|
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
(cherry picked from commit 6c53f2528c86fb72f19951a799f0afaa02ad4490)
|
|
---
|
|
src/plugins/platforms/xcb/qxcbdrag.cpp | 6 ++++++
|
|
src/plugins/platforms/xcb/qxcbscreen.cpp | 1 +
|
|
src/plugins/platforms/xcb/qxcbsystemtraytracker.cpp | 2 +-
|
|
src/plugins/platforms/xcb/qxcbwindow.cpp | 5 +++++
|
|
4 files changed, 13 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp
|
|
index aa6445d2da56f09696c98cba76baf6c74e44841c..f5cc87394b941014a1f45e0064d341dc8ad093d0 100644
|
|
--- a/src/plugins/platforms/xcb/qxcbdrag.cpp
|
|
+++ b/src/plugins/platforms/xcb/qxcbdrag.cpp
|
|
@@ -423,6 +423,7 @@ void QXcbDrag::move(const QPoint &globalPos)
|
|
|
|
xcb_client_message_event_t enter;
|
|
enter.response_type = XCB_CLIENT_MESSAGE;
|
|
+ enter.sequence = 0;
|
|
enter.window = target;
|
|
enter.format = 32;
|
|
enter.type = atom(QXcbAtom::XdndEnter);
|
|
@@ -451,6 +452,7 @@ void QXcbDrag::move(const QPoint &globalPos)
|
|
|
|
xcb_client_message_event_t move;
|
|
move.response_type = XCB_CLIENT_MESSAGE;
|
|
+ move.sequence = 0;
|
|
move.window = target;
|
|
move.format = 32;
|
|
move.type = atom(QXcbAtom::XdndPosition);
|
|
@@ -479,6 +481,7 @@ void QXcbDrag::drop(const QPoint &globalPos)
|
|
|
|
xcb_client_message_event_t drop;
|
|
drop.response_type = XCB_CLIENT_MESSAGE;
|
|
+ drop.sequence = 0;
|
|
drop.window = current_target;
|
|
drop.format = 32;
|
|
drop.type = atom(QXcbAtom::XdndDrop);
|
|
@@ -740,6 +743,7 @@ void QXcbDrag::handle_xdnd_position(QPlatformWindow *w, const xcb_client_message
|
|
|
|
xcb_client_message_event_t response;
|
|
response.response_type = XCB_CLIENT_MESSAGE;
|
|
+ response.sequence = 0;
|
|
response.window = xdnd_dragsource;
|
|
response.format = 32;
|
|
response.type = atom(QXcbAtom::XdndStatus);
|
|
@@ -886,6 +890,7 @@ void QXcbDrag::send_leave()
|
|
|
|
xcb_client_message_event_t leave;
|
|
leave.response_type = XCB_CLIENT_MESSAGE;
|
|
+ leave.sequence = 0;
|
|
leave.window = current_target;
|
|
leave.format = 32;
|
|
leave.type = atom(QXcbAtom::XdndLeave);
|
|
@@ -956,6 +961,7 @@ void QXcbDrag::handleDrop(QPlatformWindow *, const xcb_client_message_event_t *e
|
|
|
|
xcb_client_message_event_t finished;
|
|
finished.response_type = XCB_CLIENT_MESSAGE;
|
|
+ finished.sequence = 0;
|
|
finished.window = xdnd_dragsource;
|
|
finished.format = 32;
|
|
finished.type = atom(QXcbAtom::XdndFinished);
|
|
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
|
|
index 1a90f824fc454c69f73ac195b1241bc6371d7aed..f74244e13c852d4a4844bb6e470d037e03a45c84 100644
|
|
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
|
|
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
|
|
@@ -361,6 +361,7 @@ void QXcbScreen::sendStartupMessage(const QByteArray &message) const
|
|
ev.response_type = XCB_CLIENT_MESSAGE;
|
|
ev.format = 8;
|
|
ev.type = connection()->atom(QXcbAtom::_NET_STARTUP_INFO_BEGIN);
|
|
+ ev.sequence = 0;
|
|
ev.window = rootWindow;
|
|
int sent = 0;
|
|
int length = message.length() + 1; // include NUL byte
|
|
diff --git a/src/plugins/platforms/xcb/qxcbsystemtraytracker.cpp b/src/plugins/platforms/xcb/qxcbsystemtraytracker.cpp
|
|
index 1f217e8de798d5161ec52bf8e88508f7314e6328..49c0440a3c4b48e2abaff5515cc4341257bcbc88 100644
|
|
--- a/src/plugins/platforms/xcb/qxcbsystemtraytracker.cpp
|
|
+++ b/src/plugins/platforms/xcb/qxcbsystemtraytracker.cpp
|
|
@@ -94,9 +94,9 @@ xcb_window_t QXcbSystemTrayTracker::locateTrayWindow(const QXcbConnection *conne
|
|
void QXcbSystemTrayTracker::requestSystemTrayWindowDock(xcb_window_t window) const
|
|
{
|
|
xcb_client_message_event_t trayRequest;
|
|
- memset(&trayRequest, 0, sizeof(trayRequest));
|
|
trayRequest.response_type = XCB_CLIENT_MESSAGE;
|
|
trayRequest.format = 32;
|
|
+ trayRequest.sequence = 0;
|
|
trayRequest.window = m_trayWindow;
|
|
trayRequest.type = m_trayAtom;
|
|
trayRequest.data.data32[0] = XCB_CURRENT_TIME;
|
|
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
|
|
index 5ed35ec8e2bbc0c29b72fb616a746a352a9df969..1dc066c692d5beaf632ead78784683c928d1c1e4 100644
|
|
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
|
|
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
|
|
@@ -1224,6 +1224,7 @@ void QXcbWindow::changeNetWmState(bool set, xcb_atom_t one, xcb_atom_t two)
|
|
|
|
event.response_type = XCB_CLIENT_MESSAGE;
|
|
event.format = 32;
|
|
+ event.sequence = 0;
|
|
event.window = m_window;
|
|
event.type = atom(QXcbAtom::_NET_WM_STATE);
|
|
event.data.data32[0] = set ? 1 : 0;
|
|
@@ -1265,6 +1266,7 @@ void QXcbWindow::setWindowState(Qt::WindowState state)
|
|
|
|
event.response_type = XCB_CLIENT_MESSAGE;
|
|
event.format = 32;
|
|
+ event.sequence = 0;
|
|
event.window = m_window;
|
|
event.type = atom(QXcbAtom::WM_CHANGE_STATE);
|
|
event.data.data32[0] = XCB_WM_STATE_ICONIC;
|
|
@@ -1660,6 +1662,7 @@ void QXcbWindow::requestActivateWindow()
|
|
|
|
event.response_type = XCB_CLIENT_MESSAGE;
|
|
event.format = 32;
|
|
+ event.sequence = 0;
|
|
event.window = m_window;
|
|
event.type = atom(QXcbAtom::_NET_ACTIVE_WINDOW);
|
|
event.data.data32[0] = 1;
|
|
@@ -2607,6 +2610,7 @@ bool QXcbWindow::startSystemResize(const QPoint &pos, Qt::Corner corner)
|
|
xcb_client_message_event_t xev;
|
|
xev.response_type = XCB_CLIENT_MESSAGE;
|
|
xev.type = moveResize;
|
|
+ xev.sequence = 0;
|
|
xev.window = xcb_window();
|
|
xev.format = 32;
|
|
const QPoint globalPos = window()->mapToGlobal(pos);
|
|
@@ -2635,6 +2639,7 @@ void QXcbWindow::sendXEmbedMessage(xcb_window_t window, quint32 message,
|
|
|
|
event.response_type = XCB_CLIENT_MESSAGE;
|
|
event.format = 32;
|
|
+ event.sequence = 0;
|
|
event.window = window;
|
|
event.type = atom(QXcbAtom::_XEMBED);
|
|
event.data.data32[0] = connection()->time();
|
|
--
|
|
2.6.6
|
|
|