Remove unneeded check and handler for broken TQt DnD

Application of patch 0037-dnd-timestamp-fix.patch to TQt3 verified before removal
(cherry picked from commit bbd5f4476c)
v3.5.13-sru
Timothy Pearson 10 years ago committed by Slávek Banko
parent d528ffc8c8
commit f416e6d8f2

@ -183,7 +183,6 @@ bool KApplication::s_dcopClientNeedsPostInit = false;
#ifdef Q_WS_X11
static Atom atom_DesktopWindow;
static Atom atom_NetSupported;
static Atom kde_xdnd_drop;
#endif
#if defined(Q_WS_X11) && defined(COMPOSITE)
@ -886,9 +885,6 @@ void KApplication::init(bool GUIenabled)
atoms[n] = &atom_NetSupported;
names[n++] = (char *) "_NET_SUPPORTED";
atoms[n] = &kde_xdnd_drop;
names[n++] = (char *) "XdndDrop";
XInternAtoms( qt_xdisplay(), names, n, false, atoms_return );
for (int i = 0; i < n; i++ )
@ -2046,43 +2042,6 @@ void KApplication::dcopBlockUserInput( bool b )
#ifdef Q_WS_X11
bool KApplication::x11EventFilter( XEvent *_event )
{
switch ( _event->type ) {
case ClientMessage:
{
#if KDE_IS_VERSION( 3, 90, 90 )
#warning This should be already in Qt, check.
#endif
// Workaround for focus stealing prevention not working when dragging e.g. text from KWrite
// to KDesktop -> the dialog asking for filename doesn't get activated. This is because
// Qt-3.2.x doesn't have concept of qt_x_user_time at all, and Qt-3.3.0b1 passes the timestamp
// in the XdndDrop message in incorrect field (and doesn't update qt_x_user_time either).
// Patch already sent, future Qt version should have this fixed.
if( _event->xclient.message_type == kde_xdnd_drop )
{ // if the message is XdndDrop
if( _event->xclient.data.l[ 1 ] == 1 << 24 // and it's broken the way it's in Qt-3.2.x
&& _event->xclient.data.l[ 2 ] == 0
&& _event->xclient.data.l[ 4 ] == 0
&& _event->xclient.data.l[ 3 ] != 0 )
{
if( GET_QT_X_USER_TIME() == 0
|| NET::timestampCompare( _event->xclient.data.l[ 3 ], GET_QT_X_USER_TIME() ) > 0 )
{ // and the timestamp looks reasonable
SET_QT_X_USER_TIME(_event->xclient.data.l[ 3 ]); // update our qt_x_user_time from it
}
}
else // normal DND, only needed until Qt updates qt_x_user_time from XdndDrop
{
if( GET_QT_X_USER_TIME() == 0
|| NET::timestampCompare( _event->xclient.data.l[ 2 ], GET_QT_X_USER_TIME() ) > 0 )
{ // the timestamp looks reasonable
SET_QT_X_USER_TIME(_event->xclient.data.l[ 2 ]); // update our qt_x_user_time from it
}
}
}
}
default: break;
}
if ( kapp_block_user_input ) {
switch ( _event->type ) {
case ButtonPress:

Loading…
Cancel
Save