From 5ba061a66e6aba4929cc77823a35e4714515ba7f Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Mon, 1 Oct 2012 12:29:36 +0200 Subject: Retrieve drop data with a proper timestamp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Occasionally drag-and-drop was returning empty mimedata due to using wrong value for timestamp. Accoring to the xdnd specification we must use timestamp from XdndPosition or XdndDroptime for retrieving the data. Task-number: QTBUG-27367 Change-Id: Iadb6b6989cfc4e8ab241e2fd0ded59355108f22f Reviewed-by: Samuel Rødal --- src/plugins/platforms/xcb/qxcbdrag.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/platforms/xcb/qxcbdrag.h') diff --git a/src/plugins/platforms/xcb/qxcbdrag.h b/src/plugins/platforms/xcb/qxcbdrag.h index 19b7dd7f96..ef277e7eec 100644 --- a/src/plugins/platforms/xcb/qxcbdrag.h +++ b/src/plugins/platforms/xcb/qxcbdrag.h @@ -98,6 +98,7 @@ public: bool dndEnable(QXcbWindow *win, bool on); void updatePixmap(); + xcb_timestamp_t targetTime() { return target_time; } protected: void timerEvent(QTimerEvent* e); @@ -128,6 +129,7 @@ private: enum { xdnd_max_type = 100 }; QList xdnd_types; + // timestamp from XdndPosition and XdndDroptime for retrieving the data xcb_timestamp_t target_time; xcb_timestamp_t source_time; -- cgit v1.2.3