summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-05-26 02:47:32 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-05-30 14:44:12 +0200
commitec23bf0457bbcea2b28feef24047a71c011b2ebc (patch)
tree71cf246099e256a9c4cc771673b882a1323a7bc9 /src/plugins/platforms/xcb/qxcbconnection.cpp
parentbbb2da4a1b49f37e3b009ea81ffcd0cc03e07ef4 (diff)
partially working paste
We now paste something from the clipboard, but the format conversion seems to be still off at times.
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 9fe1730fe1..be341d292e 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -85,11 +85,11 @@ QXcbConnection::QXcbConnection(const char *displayName)
, m_has_support_for_dri2(false)
#endif
{
- int primaryScreen = 0;
+ m_primaryScreen = 0;
#ifdef XCB_USE_XLIB
Display *dpy = XOpenDisplay(m_displayName.constData());
- primaryScreen = DefaultScreen(dpy);
+ m_primaryScreen = DefaultScreen(dpy);
m_connection = XGetXCBConnection(dpy);
XSetEventQueueOwner(dpy, XCBOwnsEventQueue);
m_xlib_display = dpy;
@@ -461,8 +461,15 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
break;
case XCB_SELECTION_REQUEST:
m_clipboard->handleSelectionRequest((xcb_selection_request_event_t *)event);
+ break;
case XCB_SELECTION_CLEAR:
+ qDebug() << "XCB_SELECTION_CLEAR";
+ handled = false;
+ break;
case XCB_SELECTION_NOTIFY:
+ qDebug() << "XCB_SELECTION_NOTIFY";
+ handled = false;
+ break;
default:
handled = false;
break;
@@ -724,7 +731,7 @@ QByteArray QXcbConnection::atomName(xcb_atom_t atom)
{
xcb_get_atom_name_cookie_t cookie = xcb_get_atom_name_unchecked(xcb_connection(), atom);
xcb_get_atom_name_reply_t *reply = xcb_get_atom_name_reply(xcb_connection(), cookie, 0);
- QByteArray result(xcb_get_atom_name_name(reply));
+ QByteArray result(xcb_get_atom_name_name(reply), xcb_get_atom_name_name_length(reply));
free(reply);
return result;
}