Annotation of /trunk/qt/patches/0037-dnd-timestamp-fix.patch
Parent Directory | Revision Log
Revision 153 -
(hide annotations)
(download)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 2138 byte(s)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 2138 byte(s)
-import
1 | niro | 153 | qt-bugs@ issue : 38794 |
2 | bugs.kde.org number : 69519 | ||
3 | applied: no | ||
4 | author: Lubos Lunak <l.lunak@kde.org> | ||
5 | |||
6 | Hello, | ||
7 | |||
8 | please consider applying the attached patch. It changes XDND handling code to | ||
9 | put the drop timestamp in the right field in the XdndDrop message according | ||
10 | to http://www.newplanetsoftware.com/xdnd/ . I'm not quite sure why the code | ||
11 | has the field moved by one, and puts 1<<24 in the flags, but I see it has a | ||
12 | todo mark next to it. The last snippet of the patch changes it to match the | ||
13 | XDND spec. I tested briefly with Gtk, Mozilla and OOo, and they still work | ||
14 | with the patch. | ||
15 | |||
16 | The rest of the patch is for fixing part of | ||
17 | http://bugs.kde.org/show_bug.cgi?id=69519, when the user drags some data to | ||
18 | the desktop, and desktop in response popups a dialog asking for filename. | ||
19 | Without the X user timestamp (qt-bugs@ issue 24923) being updated after the | ||
20 | drop, KWin's focus stealing prevention will refuse to activate the dialog. As | ||
21 | the XdndDrop message is kind of an user action too, the timestamp should be | ||
22 | updated. | ||
23 | |||
24 | --- src/kernel/qdnd_x11.cpp.sav 2004-01-05 19:18:33.000000000 +0100 | ||
25 | +++ src/kernel/qdnd_x11.cpp 2004-01-08 19:08:52.000000000 +0100 | ||
26 | @@ -81,6 +81,7 @@ extern void qt_leave_modal( QWidget *wid | ||
27 | extern Window qt_x11_findClientWindow( Window, Atom, bool ); | ||
28 | extern Atom qt_wm_state; | ||
29 | extern Time qt_x_time; | ||
30 | +extern Time qt_x_user_time; | ||
31 | |||
32 | // this stuff is copied from qclb_x11.cpp | ||
33 | |||
34 | @@ -834,6 +835,9 @@ void qt_handle_xdnd_drop( QWidget *, con | ||
35 | // l[0], qt_xdnd_dragsource_xid ); | ||
36 | return; | ||
37 | } | ||
38 | + | ||
39 | + if( l[2] != 0 ) | ||
40 | + qt_x_user_time = l[2]; | ||
41 | if ( qt_xdnd_source_object ) | ||
42 | qt_xdnd_source_object->setTarget( qt_xdnd_current_widget ); | ||
43 | |||
44 | @@ -1366,9 +1370,9 @@ void QDragManager::drop() | ||
45 | drop.format = 32; | ||
46 | drop.message_type = qt_xdnd_drop; | ||
47 | drop.data.l[0] = object->source()->winId(); | ||
48 | - drop.data.l[1] = 1 << 24; // flags | ||
49 | - drop.data.l[2] = 0; // ### | ||
50 | - drop.data.l[3] = qt_x_time; | ||
51 | + drop.data.l[1] = 0; // flags | ||
52 | + drop.data.l[2] = qt_x_time; | ||
53 | + drop.data.l[3] = 0; | ||
54 | drop.data.l[4] = 0; | ||
55 | |||
56 | QWidget * w = QWidget::find( qt_xdnd_current_proxy_target ); |