summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaleb Tennis <caleb@gentoo.org>2005-05-27 13:51:10 +0000
committerCaleb Tennis <caleb@gentoo.org>2005-05-27 13:51:10 +0000
commit5cd7a11b060a8a3273d46aedeeeee648e24567c9 (patch)
treec5929f91a05e1a08b093e0d97e784c1ef686be84 /x11-libs
parentFixing diget for bug #94165. (diff)
downloadgentoo-2-5cd7a11b060a8a3273d46aedeeeee648e24567c9.tar.gz
gentoo-2-5cd7a11b060a8a3273d46aedeeeee648e24567c9.tar.bz2
gentoo-2-5cd7a11b060a8a3273d46aedeeeee648e24567c9.zip
New revision, adds some drag and drop patches, now installs msg2qm utility, and remove the -lpthread direct linkage from the configure line
(Portage version: 2.0.51.19)
Diffstat (limited to 'x11-libs')
-rw-r--r--x11-libs/qt/ChangeLog13
-rw-r--r--x11-libs/qt/Manifest16
-rw-r--r--x11-libs/qt/files/0001-dnd_optimization.patch187
-rw-r--r--x11-libs/qt/files/0002-dnd_active_window_fix.patch189
-rw-r--r--x11-libs/qt/files/0037-dnd-timestamp-fix.patch56
-rw-r--r--x11-libs/qt/files/0038-dragobject-dont-prefer-unknown.patch57
-rw-r--r--x11-libs/qt/files/digest-qt-3.3.4-r42
-rw-r--r--x11-libs/qt/qt-3.3.4-r4.ebuild297
8 files changed, 806 insertions, 11 deletions
diff --git a/x11-libs/qt/ChangeLog b/x11-libs/qt/ChangeLog
index 261bc75f27ab..1453b73d28af 100644
--- a/x11-libs/qt/ChangeLog
+++ b/x11-libs/qt/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for x11-libs/qt
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt/ChangeLog,v 1.217 2005/05/26 15:03:52 herbs Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt/ChangeLog,v 1.218 2005/05/27 13:51:10 caleb Exp $
+
+*qt-3.3.4-r4 (27 May 2005)
+
+ 27 May 2005; Caleb Tennis <caleb@gentoo.org>
+ +files/0001-dnd_optimization.patch,
+ +files/0002-dnd_active_window_fix.patch,
+ +files/0037-dnd-timestamp-fix.patch,
+ +files/0038-dragobject-dont-prefer-unknown.patch, +qt-3.3.4-r4.ebuild:
+ New revision. Adding some drag and drop patches (bug #93467),
+ now installing msg2qm utility (bug #91666) and removing the
+ direct linkage of -lpthread from the configure line (bug #93930).
26 May 2005; Herbie Hopkins <herbs@gentoo.org> qt-3.3.4-r3.ebuild,
qt-4.0.0_beta2-r2.ebuild:
diff --git a/x11-libs/qt/Manifest b/x11-libs/qt/Manifest
index 8078f7bc6d66..562a79fe39a4 100644
--- a/x11-libs/qt/Manifest
+++ b/x11-libs/qt/Manifest
@@ -1,17 +1,18 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
MD5 173ea867f6e159b522b70af80f2e911c qt-3.3.4-r3.ebuild 8773
MD5 7daec76f47482903184ed2b6d6d5640f qt-3.3.3-r1.ebuild 8039
MD5 f95213fd78b54c46551f61351142beb7 qt-4.0.0_beta2.ebuild 5982
MD5 417ad387ed16d015fdc15dd25deca382 qt-4.0.0_beta2-r2.ebuild 6098
MD5 404ab84e0b37823cbcbbe0c72a5758f5 qt-3.3.4-r2.ebuild 8388
MD5 dc7eab137481c73dca4e2ea75795fa9f qt-4.0.0_beta1-r5.ebuild 5880
+MD5 9956fb7d706a893d852c7f4e7f22bc6c qt-3.3.4-r4.ebuild 9127
MD5 2858d7024cd736962108973b0abb4dc1 ChangeLog 35979
MD5 512150b47a904b0240101e319856aab1 metadata.xml 156
MD5 3f30d4e96664ba2574dfb069b708f4a1 qt-3.3.3.ebuild 6897
MD5 08029b610ff355dafc7618ea1abaec61 qt-4.0.0_beta2-r1.ebuild 5985
MD5 74acd4c098f2c4bd70bdea585f0cb096 files/qt-no-rpath.patch 352
+MD5 8ffca1b1b7523339af04fd24b4595ce4 files/0001-dnd_optimization.patch 5623
+MD5 0cc401186f490faf55906cd458280db8 files/0037-dnd-timestamp-fix.patch 2138
+MD5 8b3da5dae8babfcbdee3be465579d6c2 files/0002-dnd_active_window_fix.patch 7289
MD5 ad4921b9f10a62c1e211d064f5c7fd9a files/44qt4 121
MD5 c7f65a0625242eccf159e2b8ee74976d files/45qt3 109
MD5 7a287bc7609ad2420f70af6d4c58302f files/50qt2 63
@@ -25,6 +26,7 @@ MD5 4122542a37b787efb9476b0fb1fdafc0 files/qt-3.3.4-0047-fix-kmenu-widget.diff 9
MD5 77ee6484af384828441336443499ec0e files/digest-qt-3.3.3-r1 238
MD5 c115b4205c2a2eab0a547375e2f62460 files/digest-qt-3.3.4-r2 166
MD5 c115b4205c2a2eab0a547375e2f62460 files/digest-qt-3.3.4-r3 166
+MD5 c115b4205c2a2eab0a547375e2f62460 files/digest-qt-3.3.4-r4 166
MD5 0221c85bc6f785b68812fc7f42110742 files/qt-3.3.3-flickerfree_qscrollview_fixwindowactivate.patch 1540
MD5 9e806a56da0d48f62aab37291e910d0e files/qt4b1_nomkdir.patch 2485
MD5 2df2442dc59faeb8b545a81d2523cf28 files/qt-3.3.3-immodule-r123-event-inversion-20040909.diff 327
@@ -45,11 +47,5 @@ MD5 da2eb517a4c29a58002e92864ff966e5 files/qt-no-rpath-uic.patch 294
MD5 a303c05de7547c9e043cf60cc86935af files/digest-qt-4.0.0_beta2 81
MD5 8f75ba0e151481962fcb239dc216cf39 files/qt-3.3.4-0051-qtoolbar_77047.patch 1278
MD5 471c09f2792eec732d715a983b7f7244 files/qt-3.3.3-immodule-20040819-event-inversion-20040908.diff 4150
+MD5 eb6eb6b68c8f747b12a3a53efc4b6480 files/0038-dragobject-dont-prefer-unknown.patch 2551
MD5 e0a483959b1d3dad0fc58adc242624c1 files/qt-3.3.3-amd64-fullscreen.patch 1220
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.1 (GNU/Linux)
-
-iD8DBQFCleX12G5bA0cA/ScRAvMyAJ4m6iAOz8vwF85PLo0XSifS2lfunACguY3i
-gLEBiYVHMtHetxCIIAiAaMg=
-=4nmU
------END PGP SIGNATURE-----
diff --git a/x11-libs/qt/files/0001-dnd_optimization.patch b/x11-libs/qt/files/0001-dnd_optimization.patch
new file mode 100644
index 000000000000..d9de28464178
--- /dev/null
+++ b/x11-libs/qt/files/0001-dnd_optimization.patch
@@ -0,0 +1,187 @@
+qt-bugs@ issue : 16115
+applied: no
+author: Lubos Lunak <l.lunak@kde.org>
+
+See http://lists.kde.org/?t=104388858900001&r=1&w=2
+
+
+--- src/kernel/qdnd_x11.cpp.sav 2003-02-05 16:09:45.000000000 +0100
++++ src/kernel/qdnd_x11.cpp 2003-02-07 16:14:49.000000000 +0100
+@@ -49,13 +49,15 @@
+ #include "qdragobject.h"
+ #include "qobjectlist.h"
+ #include "qcursor.h"
++#include "qbitmap.h"
++#include "qpainter.h"
+
+ #include "qt_x11_p.h"
+
+ // conflict resolution
+
+-// unused, may be used again later: const int XKeyPress = KeyPress;
+-// unused, may be used again later: const int XKeyRelease = KeyRelease;
++const int XKeyPress = KeyPress;
++const int XKeyRelease = KeyRelease;
+ #undef KeyPress
+ #undef KeyRelease
+
+@@ -249,20 +251,47 @@ class QShapedPixmapWidget : public QWidg
+ public:
+ QShapedPixmapWidget(int screen = -1) :
+ QWidget(QApplication::desktop()->screen( screen ),
+- 0, WStyle_Customize | WStyle_Tool | WStyle_NoBorder | WX11BypassWM )
++ 0, WStyle_Customize | WStyle_Tool | WStyle_NoBorder | WX11BypassWM ), oldpmser( 0 ), oldbmser( 0 )
+ {
+ }
+
+- void setPixmap(QPixmap pm)
++ void setPixmap(QPixmap pm, QPoint hot)
+ {
+- if ( pm.mask() ) {
++ int bmser = pm.mask() ? pm.mask()->serialNumber() : 0;
++ if( oldpmser == pm.serialNumber() && oldbmser == bmser
++ && oldhot == hot )
++ return;
++ oldpmser = pm.serialNumber();
++ oldbmser = bmser;
++ oldhot = hot;
++ bool hotspot_in = !(hot.x() < 0 || hot.y() < 0 || hot.x() >= pm.width() || hot.y() >= pm.height());
++// if the pixmap has hotspot in its area, make a "hole" in it at that position
++// this will allow XTranslateCoordinates() to find directly the window below the cursor instead
++// of finding this pixmap, and therefore there won't be needed any (slow) search for the window
++// using findRealWindow()
++ if( hotspot_in ) {
++ QBitmap mask = pm.mask() ? *pm.mask() : QBitmap( pm.width(), pm.height());
++ if( !pm.mask())
++ mask.fill( Qt::color1 );
++ QPainter p( &mask );
++ p.setPen( Qt::color0 );
++ p.drawPoint( hot.x(), hot.y());
++ p.end();
++ pm.setMask( mask );
++ setMask( mask );
++ } else if ( pm.mask() ) {
+ setMask( *pm.mask() );
+ } else {
+ clearMask();
+ }
+ resize(pm.width(),pm.height());
+ setErasePixmap(pm);
++ erase();
+ }
++private:
++ int oldpmser;
++ int oldbmser;
++ QPoint oldhot;
+ };
+
+ QShapedPixmapWidget * qt_xdnd_deco = 0;
+@@ -859,6 +888,45 @@ void QDragManager::timerEvent( QTimerEve
+ move( QCursor::pos() );
+ }
+
++static bool qt_xdnd_was_move = false;
++static bool qt_xdnd_found = false;
++// check whole incoming X queue for move events
++// checking whole queue is done by always returning False in the predicate
++// if there's another move event in the queue, and there's not a mouse button
++// or keyboard or ClientMessage event before it, the current move event
++// may be safely discarded
++// this helps avoiding being overloaded by being flooded from many events
++// from the XServer
++static
++Bool qt_xdnd_predicate( Display*, XEvent* ev, XPointer )
++{
++ if( qt_xdnd_found )
++ return False;
++ if( ev->type == MotionNotify )
++ {
++ qt_xdnd_was_move = true;
++ qt_xdnd_found = true;
++ }
++ if( ev->type == ButtonPress || ev->type == ButtonRelease
++ || ev->type == XKeyPress || ev->type == XKeyRelease
++ || ev->type == ClientMessage )
++ {
++ qt_xdnd_was_move = false;
++ qt_xdnd_found = true;
++ }
++ return False;
++}
++
++static
++bool qt_xdnd_another_movement()
++{
++ qt_xdnd_was_move = false;
++ qt_xdnd_found = false;
++ XEvent dummy;
++ XCheckIfEvent( qt_xdisplay(), &dummy, qt_xdnd_predicate, NULL );
++ return qt_xdnd_was_move;
++}
++
+ bool QDragManager::eventFilter( QObject * o, QEvent * e)
+ {
+ if ( beingCancelled ) {
+@@ -881,8 +949,10 @@ bool QDragManager::eventFilter( QObject
+
+ if ( e->type() == QEvent::MouseMove ) {
+ QMouseEvent* me = (QMouseEvent *)e;
+- updateMode(me->stateAfter());
+- move( me->globalPos() );
++ if( !qt_xdnd_another_movement()) {
++ updateMode(me->stateAfter());
++ move( me->globalPos() );
++ }
+ return TRUE;
+ } else if ( e->type() == QEvent::MouseButtonRelease ) {
+ qApp->removeEventFilter( this );
+@@ -1106,7 +1176,7 @@ void QDragManager::move( const QPoint &
+ delete qt_xdnd_deco;
+ qt_xdnd_deco = new QShapedPixmapWidget( screen );
+ }
+- updatePixmap();
++ updatePixmap( globalPos );
+
+ if ( qt_xdnd_source_sameanswer.contains( globalPos ) &&
+ qt_xdnd_source_sameanswer.isValid() ) {
+@@ -1679,7 +1749,7 @@ bool QDragManager::drag( QDragObject * o
+ // qt_xdnd_source_object persists until we get an xdnd_finish message
+ }
+
+-void QDragManager::updatePixmap()
++void QDragManager::updatePixmap( const QPoint& cursorPos )
+ {
+ if ( qt_xdnd_deco ) {
+ QPixmap pm;
+@@ -1694,9 +1764,8 @@ void QDragManager::updatePixmap()
+ defaultPm = new QPixmap(default_pm);
+ pm = *defaultPm;
+ }
+- qt_xdnd_deco->setPixmap(pm);
+- qt_xdnd_deco->move(QCursor::pos()-pm_hot);
+- qt_xdnd_deco->repaint(FALSE);
++ qt_xdnd_deco->setPixmap(pm, pm_hot);
++ qt_xdnd_deco->move(cursorPos-pm_hot);
+ //if ( willDrop ) {
+ qt_xdnd_deco->show();
+ //} else {
+@@ -1705,4 +1774,9 @@ void QDragManager::updatePixmap()
+ }
+ }
+
++void QDragManager::updatePixmap()
++{
++ updatePixmap( QCursor::pos());
++}
++
+ #endif // QT_NO_DRAGANDDROP
+--- src/kernel/qdragobject.h.sav 2002-11-01 19:25:07.000000000 +0100
++++ src/kernel/qdragobject.h 2001-01-01 01:01:00.000000000 +0100
+@@ -245,6 +245,7 @@ private:
+ void move( const QPoint & );
+ void drop();
+ void updatePixmap();
++ void updatePixmap( const QPoint& cursorPos );
+
+ private:
+ QDragObject * object;
diff --git a/x11-libs/qt/files/0002-dnd_active_window_fix.patch b/x11-libs/qt/files/0002-dnd_active_window_fix.patch
new file mode 100644
index 000000000000..4b497d64f65f
--- /dev/null
+++ b/x11-libs/qt/files/0002-dnd_active_window_fix.patch
@@ -0,0 +1,189 @@
+qt-bugs@ issue : 25122
+applied: no
+author: Lubos Lunak <l.lunak@kde.org>
+
+ Hello,
+
+ for example: Open Konqueror window, showing some files. Start dragging one
+ desktop icon. If you press/release Ctrl, there'll be a '+' attached to the
+ icon, showing the DND operation. Now, while still doing DND, make the
+ Konqueror window active (Alt+Tab with KDE-3.1.2+, hover over its taskbar
+ entry, Ctrl+Fn to switch to a different virtual desktop, etc.). As soon as
+ the app performing DND is not the active application, and the mouse is not
+ moving, pressing/releasing Ctrl doesn't do anything, the state only updates
+ when the mouse is moved.
+
+ This is caused by the fact that Qt has only pointer grab when doing DND, but
+ doesn't have keyboard grab. I actually consider this a good thing, because
+ the only keys important for DND are modifiers, and they come together with
+ pointer events, and not having keyboard grab allows using keyboard shortcuts
+ like Alt+Tab while DND. However, when the mouse is not moved, and only a
+ modifier key is pressed/released, the app won't get any mouse event, and
+ won't also get the keyboard event.
+
+ The attached patch changes Qt to explicitly check the modifiers state using
+ XQueryPointer() if there's wasn't recently any mouse/keyboard event, which
+ ensures the state is updated even in the situation described above.
+
+--- src/kernel/qapplication_x11.cpp.sav 2003-06-21 12:31:35.000000000 +0200
++++ src/kernel/qapplication_x11.cpp 2003-06-21 12:35:44.000000000 +0200
+@@ -4053,7 +4053,7 @@ void QApplication::closePopup( QWidget *
+ // Keyboard event translation
+ //
+
+-static int translateButtonState( int s )
++int qt_x11_translateButtonState( int s )
+ {
+ int bst = 0;
+ if ( s & Button1Mask )
+@@ -4119,7 +4119,7 @@ bool QETWidget::translateMouseEvent( con
+ pos.ry() = lastMotion.y;
+ globalPos.rx() = lastMotion.x_root;
+ globalPos.ry() = lastMotion.y_root;
+- state = translateButtonState( lastMotion.state );
++ state = qt_x11_translateButtonState( lastMotion.state );
+ if ( qt_button_down && (state & (LeftButton |
+ MidButton |
+ RightButton ) ) == 0 )
+@@ -4143,7 +4143,7 @@ bool QETWidget::translateMouseEvent( con
+ pos.ry() = xevent->xcrossing.y;
+ globalPos.rx() = xevent->xcrossing.x_root;
+ globalPos.ry() = xevent->xcrossing.y_root;
+- state = translateButtonState( xevent->xcrossing.state );
++ state = qt_x11_translateButtonState( xevent->xcrossing.state );
+ if ( qt_button_down && (state & (LeftButton |
+ MidButton |
+ RightButton ) ) == 0 )
+@@ -4155,7 +4155,7 @@ bool QETWidget::translateMouseEvent( con
+ pos.ry() = event->xbutton.y;
+ globalPos.rx() = event->xbutton.x_root;
+ globalPos.ry() = event->xbutton.y_root;
+- state = translateButtonState( event->xbutton.state );
++ state = qt_x11_translateButtonState( event->xbutton.state );
+ switch ( event->xbutton.button ) {
+ case Button1: button = LeftButton; break;
+ case Button2: button = MidButton; break;
+@@ -4950,7 +4950,7 @@ bool QETWidget::translateKeyEventInterna
+ XKeyEvent xkeyevent = event->xkey;
+
+ // save the modifier state, we will use the keystate uint later by passing
+- // it to translateButtonState
++ // it to qt_x11_translateButtonState
+ uint keystate = event->xkey.state;
+ // remove the modifiers where mode_switch exists... HPUX machines seem
+ // to have alt *AND* mode_switch both in Mod1Mask, which causes
+@@ -5064,7 +5064,7 @@ bool QETWidget::translateKeyEventInterna
+ }
+ #endif // !QT_NO_XIM
+
+- state = translateButtonState( keystate );
++ state = qt_x11_translateButtonState( keystate );
+
+ static int directionKeyEvent = 0;
+ if ( qt_use_rtl_extensions && type == QEvent::KeyRelease ) {
+--- src/kernel/qdnd_x11.cpp.sav 2003-06-30 15:26:42.000000000 +0200
++++ src/kernel/qdnd_x11.cpp 2003-06-30 15:32:23.000000000 +0200
+@@ -114,6 +114,8 @@ Atom qt_xdnd_finished;
+ Atom qt_xdnd_type_list;
+ const int qt_xdnd_version = 4;
+
++extern int qt_x11_translateButtonState( int s );
++
+ // Actions
+ //
+ // The Xdnd spec allows for user-defined actions. This could be implemented
+@@ -198,6 +200,8 @@ static Atom qt_xdnd_source_current_time;
+ static int qt_xdnd_current_screen = -1;
+ // state of dragging... true if dragging, false if not
+ bool qt_xdnd_dragging = FALSE;
++// need to check state of keyboard modifiers
++static bool need_modifiers_check = FALSE;
+
+ // dict of payload data, sorted by type atom
+ static QIntDict<QByteArray> * qt_xdnd_target_data = 0;
+@@ -879,8 +883,20 @@ void qt_handle_xdnd_finished( QWidget *,
+
+ void QDragManager::timerEvent( QTimerEvent* e )
+ {
+- if ( e->timerId() == heartbeat && qt_xdnd_source_sameanswer.isNull() )
+- move( QCursor::pos() );
++ if ( e->timerId() == heartbeat ) {
++ if( need_modifiers_check ) {
++ Window root, child;
++ int root_x, root_y, win_x, win_y;
++ unsigned int mask;
++ XQueryPointer( qt_xdisplay(), qt_xrootwin( qt_xdnd_current_screen ),
++ &root, &child, &root_x, &root_y, &win_x, &win_y, &mask );
++ if( updateMode( (ButtonState)qt_x11_translateButtonState( mask )))
++ qt_xdnd_source_sameanswer = QRect(); // force move
++ }
++ need_modifiers_check = TRUE;
++ if( qt_xdnd_source_sameanswer.isNull() )
++ move( QCursor::pos() );
++ }
+ }
+
+ static bool qt_xdnd_was_move = false;
+@@ -948,6 +964,7 @@ bool QDragManager::eventFilter( QObject
+ updateMode(me->stateAfter());
+ move( me->globalPos() );
+ }
++ need_modifiers_check = FALSE;
+ return TRUE;
+ } else if ( e->type() == QEvent::MouseButtonRelease ) {
+ qApp->removeEventFilter( this );
+@@ -986,9 +1003,11 @@ bool QDragManager::eventFilter( QObject
+ beingCancelled = FALSE;
+ qApp->exit_loop();
+ } else {
+- updateMode(ke->stateAfter());
+- qt_xdnd_source_sameanswer = QRect(); // force move
+- move( QCursor::pos() );
++ if( updateMode(ke->stateAfter())) {
++ qt_xdnd_source_sameanswer = QRect(); // force move
++ move( QCursor::pos() );
++ }
++ need_modifiers_check = FALSE;
+ }
+ return TRUE; // Eat all key events
+ }
+@@ -1014,10 +1033,10 @@ bool QDragManager::eventFilter( QObject
+
+
+ static Qt::ButtonState oldstate;
+-void QDragManager::updateMode( ButtonState newstate )
++bool QDragManager::updateMode( ButtonState newstate )
+ {
+ if ( newstate == oldstate )
+- return;
++ return false;
+ const int both = ShiftButton|ControlButton;
+ if ( (newstate & both) == both ) {
+ global_requested_action = QDropEvent::Link;
+@@ -1041,6 +1060,7 @@ void QDragManager::updateMode( ButtonSta
+ }
+ }
+ oldstate = newstate;
++ return true;
+ }
+
+
+@@ -1707,6 +1727,7 @@ bool QDragManager::drag( QDragObject * o
+ qt_xdnd_source_sameanswer = QRect();
+ move(QCursor::pos());
+ heartbeat = startTimer(200);
++ need_modifiers_check = FALSE;
+
+ #ifndef QT_NO_CURSOR
+ qApp->setOverrideCursor( arrowCursor );
+--- src/kernel/qdragobject.h.sav 2003-05-19 22:34:43.000000000 +0200
++++ src/kernel/qdragobject.h 2001-01-01 01:01:00.000000000 +0100
+@@ -248,7 +248,7 @@ private:
+
+ private:
+ QDragObject * object;
+- void updateMode( ButtonState newstate );
++ bool updateMode( ButtonState newstate );
+ void updateCursor();
+
+ QWidget * dragSource;
diff --git a/x11-libs/qt/files/0037-dnd-timestamp-fix.patch b/x11-libs/qt/files/0037-dnd-timestamp-fix.patch
new file mode 100644
index 000000000000..234e1b794705
--- /dev/null
+++ b/x11-libs/qt/files/0037-dnd-timestamp-fix.patch
@@ -0,0 +1,56 @@
+qt-bugs@ issue : 38794
+bugs.kde.org number : 69519
+applied: no
+author: Lubos Lunak <l.lunak@kde.org>
+
+ Hello,
+
+please consider applying the attached patch. It changes XDND handling code to
+put the drop timestamp in the right field in the XdndDrop message according
+to http://www.newplanetsoftware.com/xdnd/ . I'm not quite sure why the code
+has the field moved by one, and puts 1<<24 in the flags, but I see it has a
+todo mark next to it. The last snippet of the patch changes it to match the
+XDND spec. I tested briefly with Gtk, Mozilla and OOo, and they still work
+with the patch.
+
+The rest of the patch is for fixing part of
+http://bugs.kde.org/show_bug.cgi?id=69519, when the user drags some data to
+the desktop, and desktop in response popups a dialog asking for filename.
+Without the X user timestamp (qt-bugs@ issue 24923) being updated after the
+drop, KWin's focus stealing prevention will refuse to activate the dialog. As
+the XdndDrop message is kind of an user action too, the timestamp should be
+updated.
+
+--- src/kernel/qdnd_x11.cpp.sav 2004-01-05 19:18:33.000000000 +0100
++++ src/kernel/qdnd_x11.cpp 2004-01-08 19:08:52.000000000 +0100
+@@ -81,6 +81,7 @@ extern void qt_leave_modal( QWidget *wid
+ extern Window qt_x11_findClientWindow( Window, Atom, bool );
+ extern Atom qt_wm_state;
+ extern Time qt_x_time;
++extern Time qt_x_user_time;
+
+ // this stuff is copied from qclb_x11.cpp
+
+@@ -834,6 +835,9 @@ void qt_handle_xdnd_drop( QWidget *, con
+ // l[0], qt_xdnd_dragsource_xid );
+ return;
+ }
++
++ if( l[2] != 0 )
++ qt_x_user_time = l[2];
+ if ( qt_xdnd_source_object )
+ qt_xdnd_source_object->setTarget( qt_xdnd_current_widget );
+
+@@ -1366,9 +1370,9 @@ void QDragManager::drop()
+ drop.format = 32;
+ drop.message_type = qt_xdnd_drop;
+ drop.data.l[0] = object->source()->winId();
+- drop.data.l[1] = 1 << 24; // flags
+- drop.data.l[2] = 0; // ###
+- drop.data.l[3] = qt_x_time;
++ drop.data.l[1] = 0; // flags
++ drop.data.l[2] = qt_x_time;
++ drop.data.l[3] = 0;
+ drop.data.l[4] = 0;
+
+ QWidget * w = QWidget::find( qt_xdnd_current_proxy_target );
diff --git a/x11-libs/qt/files/0038-dragobject-dont-prefer-unknown.patch b/x11-libs/qt/files/0038-dragobject-dont-prefer-unknown.patch
new file mode 100644
index 000000000000..ae4163ae2d29
--- /dev/null
+++ b/x11-libs/qt/files/0038-dragobject-dont-prefer-unknown.patch
@@ -0,0 +1,57 @@
+qt-bugs@ issue : 38642
+bugs.kde.org number : 71084
+applied: no
+author: Lubos Lunak <l.lunak@kde.org>
+
+Hello,
+
+ start Mozilla, go e.g. to http://kde.org, start KWrite (or basically any Qt
+app that accepts text drops), select 'Conquer your Desktop!', and try to
+drag&drop it onto KWrite. The only text pasted should be 'm'.
+
+ I don't know much the related mimetype and encoding stuff, so I'm unsure
+whose fault this actually is. The text drag is provided as a lot of
+text/something targets, to list some text/_moz_htmlinfo, text/x-moz-url,
+text/unicode and similar. The problem is, Kate uses QTextDrag::decode() with
+no subtype specified, probably with the intention that as Kate is a text
+editor, it can accept any text pasted. And since the first target provided by
+mozilla is text/x-moz-url, (which moreover seems to be encoded as 16bit
+unicode), the text dropped is completely wrong. You can easily see all
+targets provided by Mozilla with see_mime.patch applied.
+
+ Solution #1: Say that Kate (any pretty much everybody else expecting text)
+should say "plain" as the subtype. In such case, I suggest you drop the
+QTextDrag::decode() variant with no subtype specified, and stress more the
+fact that not specifying a subtype can result in a lot of rubbish. It's
+simply too tempting to leave the subtype empty and try to accept anything.
+
+ Solution #2: When trying to accept anything, try to get useful data. Which
+means either sorting the subtypes available somehow, checking only the ones
+Qt knows.
+
+ To me, #1 seems to be a better choice, or possibly at least something like
+the attached QTextDrag patch, which simply always tries first "plain" subtype
+if none is specified. With this patch, Mozilla even works (that's irony, of
+course, Mozilla still pastes the text/plain text as HTML, but at least now it
+pastes something where it's easy to point at the offender).
+
+
+--- src/kernel/qdragobject.cpp.sav 2004-01-06 19:24:35.000000000 +0100
++++ src/kernel/qdragobject.cpp 2004-01-06 19:47:01.000000000 +0100
+@@ -844,6 +844,16 @@ bool QTextDrag::decode( const QMimeSourc
+ {
+ if(!e)
+ return FALSE;
++
++ // when subtype is not specified, try text/plain first, otherwise this may read
++ // things like text/x-moz-url even though better targets are available
++ if( subtype.isNull()) {
++ QCString subtmp = "plain";
++ if( decode( e, str, subtmp )) {
++ subtype = subtmp;
++ return true;
++ }
++ }
+
+ if ( e->cacheType == QMimeSource::Text ) {
+ str = *e->cache.txt.str;
diff --git a/x11-libs/qt/files/digest-qt-3.3.4-r4 b/x11-libs/qt/files/digest-qt-3.3.4-r4
new file mode 100644
index 000000000000..d12b1ee1a446
--- /dev/null
+++ b/x11-libs/qt/files/digest-qt-3.3.4-r4
@@ -0,0 +1,2 @@
+MD5 027f4e82fbe592b39d2f160bfb3a73af qt-x11-free-3.3.4.tar.bz2 14439722
+MD5 85fdf8ac3264a8849ebae74aa9c37a9b qt-x11-immodule-unified-qt3.3.4-20041203.diff.bz2 113389
diff --git a/x11-libs/qt/qt-3.3.4-r4.ebuild b/x11-libs/qt/qt-3.3.4-r4.ebuild
new file mode 100644
index 000000000000..a3ff85b862d6
--- /dev/null
+++ b/x11-libs/qt/qt-3.3.4-r4.ebuild
@@ -0,0 +1,297 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt/qt-3.3.4-r4.ebuild,v 1.1 2005/05/27 13:51:10 caleb Exp $
+
+inherit eutils flag-o-matic
+
+SRCTYPE="free"
+DESCRIPTION="QT version ${PV}"
+HOMEPAGE="http://www.trolltech.com/"
+
+IMMQT_P="qt-x11-immodule-unified-qt3.3.4-20041203"
+
+SRC_URI="ftp://ftp.trolltech.com/qt/source/qt-x11-${SRCTYPE}-${PV}.tar.bz2
+ immqt? ( http://freedesktop.org/~daisuke/${IMMQT_P}.diff.bz2 )
+ immqt-bc? ( http://freedesktop.org/~daisuke/${IMMQT_P}.diff.bz2 )"
+# ppc-macos? ( http://dev.gentoo.org/~usata/distfiles/${P}-darwin-fink.patch.gz )"
+
+LICENSE="|| ( QPL-1.0 GPL-2 )"
+SLOT="3"
+KEYWORDS="~x86 ~amd64 ~hppa ~mips ~ppc64 ~sparc ~ia64 ~ppc ~alpha"
+IUSE="cups debug doc examples firebird gif ipv6 mysql nas odbc opengl postgres sqlite xinerama zlib immqt immqt-bc"
+
+DEPEND="virtual/x11 virtual/xft
+ media-libs/libpng
+ media-libs/jpeg
+ media-libs/libmng
+ >=media-libs/freetype-2
+ nas? ( >=media-libs/nas-1.5 )
+ odbc? ( dev-db/unixODBC )
+ mysql? ( dev-db/mysql )
+ firebird? ( dev-db/firebird )
+ opengl? ( virtual/opengl virtual/glu )
+ postgres? ( dev-db/postgresql )
+ cups? ( net-print/cups )
+ zlib? ( sys-libs/zlib )"
+
+S=${WORKDIR}/qt-x11-${SRCTYPE}-${PV}
+
+QTBASE=/usr/qt/3
+
+pkg_setup() {
+ if use immqt ; then
+ ewarn
+ ewarn "You are going to compile binary imcompatible immodule for Qt. This means"
+ ewarn "you have to recompile everything depending on Qt after you install it."
+ ewarn "Be aware."
+ ewarn
+ fi
+
+ export QTDIR=${S}
+
+ if useq ppc-macos ; then
+ export PLATFORM=darwin-g++
+ export DYLD_LIBRARY_PATH="${QTDIR}/lib:/usr/X11R6/lib:${DYLD_LIBRARY_PATH}"
+ export INSTALL_ROOT=""
+ else
+ # probably this should be 'linux-g++-64' for 64bit archs
+ # in a fully multilib environment (no compatibility symlinks)
+ export PLATFORM=linux-g++
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+
+ cp configure configure.orig
+ sed -e 's:read acceptance:acceptance=yes:' configure.orig > configure
+
+ epatch ${FILESDIR}/qt-no-rpath-uic.patch
+ epatch ${FILESDIR}/qt-no-rpath.patch
+
+ # fix freeze caused by bad interaction with kde klipper (kde bug 80072)
+ epatch ${FILESDIR}/${P}-qclipboard-hack.patch
+
+ # performance patches (see http://robotics.dei.unipd.it/~koral/KDE/kflicker.html)
+ epatch ${FILESDIR}/${P}-flickerfree_qiconview_buffered.patch
+ epatch ${FILESDIR}/${P}-flickerfree_qscrollview_fixwindowactivate.patch
+
+ # KDE related patches
+ epatch ${FILESDIR}/0001-dnd_optimization.patch
+ epatch ${FILESDIR}/0002-dnd_active_window_fix.patch
+ epatch ${FILESDIR}/0037-dnd-timestamp-fix.patch
+ epatch ${FILESDIR}/0038-dragobject-dont-prefer-unknown.patch
+ epatch ${FILESDIR}/${P}-0051-qtoolbar_77047.patch
+ epatch ${FILESDIR}/${P}-0047-fix-kmenu-widget.diff
+
+ if use immqt || use immqt-bc ; then
+ epatch ../${IMMQT_P}.diff
+ epatch ${FILESDIR}/${P}-immodule-focus.patch
+ sh make-symlinks.sh || die "make symlinks failed"
+ fi
+
+ if use ppc-macos ; then
+ gzcat ${FILESDIR}/${P}-darwin-fink.patch.gz | sed -e "s:@QTBASE@:${QTBASE}:g" > ${T}/${P}-darwin-fink.patch
+ epatch ${T}/${P}-darwin-fink.patch
+ fi
+
+ cd mkspecs/${PLATFORM}
+ # set c/xxflags and ldflags
+ strip-flags
+ sed -i -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \
+ -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \
+ -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \
+ qmake.conf || die
+ cd ${S}
+}
+
+src_compile() {
+ export SYSCONF=${D}${QTBASE}/etc/settings
+
+ # Let's just allow writing to these directories during Qt emerge
+ # as it makes Qt much happier.
+ addwrite "${QTBASE}/etc/settings"
+ addwrite "${HOME}/.qt"
+
+ [ $(get_libdir) != "lib" ] && myconf="${myconf} -L/usr/$(get_libdir)"
+
+ use nas && myconf="${myconf} -system-nas-sound"
+ use gif && myconf="${myconf} -qt-gif" || myconf="${myconf} -no-gif"
+ use mysql && myconf="${myconf} -plugin-sql-mysql -I/usr/include/mysql -L/usr/$(get_libdir)/mysql" || myconf="${myconf} -no-sql-mysql"
+ use postgres && myconf="${myconf} -plugin-sql-psql -I/usr/include/postgresql/server -I/usr/include/postgresql/pgsql -I/usr/include/postgresql/pgsql/server" || myconf="${myconf} -no-sql-psql"
+ use firebird && myconf="${myconf} -plugin-sql-ibase" || myconf="${myconf} -no-sql-ibase"
+ use sqlite && myconf="${myconf} -plugin-sql-sqlite" || myconf="${myconf} -no-sql-sqlite"
+ use odbc && myconf="${myconf} -plugin-sql-odbc" || myconf="${myconf} -no-sql-odbc"
+ use cups && myconf="${myconf} -cups" || myconf="${myconf} -no-cups"
+ use opengl && myconf="${myconf} -enable-module=opengl" || myconf="${myconf} -disable-opengl"
+ use debug && myconf="${myconf} -debug" || myconf="${myconf} -release -no-g++-exceptions"
+ use xinerama && myconf="${myconf} -xinerama" || myconf="${myconf} -no-xinerama"
+ use zlib && myconf="${myconf} -system-zlib" || myconf="${myconf} -qt-zlib"
+ use ipv6 && myconf="${myconf} -ipv6" || myconf="${myconf} -no-ipv6"
+ use immqt-bc && myconf="${myconf} -inputmethod"
+ use immqt && myconf="${myconf} -inputmethod -inputmethod-ext"
+
+ if use ppc-macos ; then
+ myconf="${myconf} -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-cups -lresolv -shared"
+ myconf="${myconf} -I/usr/X11R6/include -L/usr/X11R6/lib"
+ myconf="${myconf} -L${S}/lib -I${S}/include"
+ sed -i -e "s,#define QT_AOUT_UNDERSCORE,," mkspecs/${PLATFORM}/qplatformdefs.h || die
+ fi
+
+ export YACC='byacc -d'
+
+ ./configure -sm -thread -stl -system-libjpeg -verbose -largefile \
+ -qt-imgfmt-{jpeg,mng,png} -tablet -system-libmng \
+ -system-libpng -xft -platform ${PLATFORM} -xplatform \
+ ${PLATFORM} -xrender -prefix ${QTBASE} -libdir ${QTBASE}/$(get_libdir) \
+ -fast ${myconf} -dlopen-opengl || die
+
+ emake src-qmake src-moc sub-src || die
+
+ export DYLD_LIBRARY_PATH="${S}/lib:/usr/X11R6/lib:${DYLD_LIBRARY_PATH}"
+ export LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}"
+
+ emake sub-tools || die
+
+ if use examples; then
+ emake sub-tutorial sub-examples || die
+ fi
+
+ # Make the msg2qm utility (not made by default)
+ cd ${S}/tools/msg2qm
+ ../../bin/qmake
+ emake
+
+}
+
+src_install() {
+ # binaries
+ into ${QTBASE}
+ dobin bin/*
+
+ # libraries
+ if use ppc-macos; then
+ # dolib is broken on BSD because of missing readlink(1)
+ dodir ${QTBASE}/$(get_libdir)
+ cp -fR lib/*.{dylib,la,a} ${D}/${QTBASE}/$(get_libdir) || die
+
+ cd ${D}/${QTBASE}/$(get_libdir)
+ for lib in libqt-mt* ; do
+ ln -s ${lib} ${lib/-mt/}
+ done
+ else
+ dolib lib/lib{editor,qassistantclient,designercore}.a
+ dolib lib/libqt-mt.la
+ dolib lib/libqt-mt.so.3.3.4 lib/libqui.so.1.0.0
+ cd ${D}/${QTBASE}/$(get_libdir)
+
+ for x in libqui.so ; do
+ ln -s $x.1.0.0 $x.1.0
+ ln -s $x.1.0 $x.1
+ ln -s $x.1 $x
+ done
+
+ # version symlinks - 3.3.4->3.3->3->.so
+ ln -s libqt-mt.so.3.3.4 libqt-mt.so.3.3
+ ln -s libqt-mt.so.3.3 libqt-mt.so.3
+ ln -s libqt-mt.so.3 libqt-mt.so
+
+ # libqt -> libqt-mt symlinks
+ ln -s libqt-mt.so.3.3.4 libqt.so.3.3.4
+ ln -s libqt-mt.so.3.3 libqt.so.3.3
+ ln -s libqt-mt.so.3 libqt.so.3
+ ln -s libqt-mt.so libqt.so
+ fi
+
+ # plugins
+ cd ${S}
+ plugins=`find plugins -name "lib*.so" -print`
+ for x in $plugins; do
+ exeinto ${QTBASE}/`dirname $x`
+ doexe $x
+ done
+
+ # Past this point just needs to be done once
+ is_final_abi || return 0
+
+ # includes
+ cd ${S}
+ dodir ${QTBASE}/include/private
+ cp include/* ${D}/${QTBASE}/include/
+ cp include/private/* ${D}/${QTBASE}/include/private/
+
+ # misc
+ insinto /etc/env.d
+ doins ${FILESDIR}/{45qt3,50qtdir3}
+
+ # List all the multilib libdirs
+ local libdirs
+ for libdir in $(get_all_libdirs); do
+ libdirs="${libdirs}:${QTBASE}/${libdir}"
+ done
+ dosed "s~^LDPATH=.*$~LDPATH=${libdirs:1}~" /etc/env.d/45qt3
+
+ if [ "${SYMLINK_LIB}" = "yes" ]; then
+ dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) ${QTBASE}/lib
+ fi
+
+ dodir ${QTBASE}/tools/designer/templates
+ cd ${S}
+ cp tools/designer/templates/* ${D}/${QTBASE}/tools/designer/templates
+
+ dodir ${QTBASE}/translations
+ cd ${S}
+ cp translations/* ${D}/${QTBASE}/translations
+
+ dodir ${QTBASE}/etc
+ keepdir ${QTBASE}/etc/settings
+
+ dodir ${QTBASE}/doc
+
+ if use doc; then
+ cp -r ${S}/doc ${D}/${QTBASE}
+ fi
+
+ if use examples; then
+ cd ${S}/examples
+ find . -name Makefile | while read MAKEFILE
+ do
+ cp ${MAKEFILE} ${MAKEFILE}.old
+ sed -e "s:${S}:${QTBASE}:g" ${MAKEFILE}.old > ${MAKEFILE}
+ rm -f ${MAKEFILE}.old
+ done
+
+ cp -r ${S}/examples ${D}/${QTBASE}
+
+ cd ${S}/tutorial
+ find . -name Makefile | while read MAKEFILE
+ do
+ cp ${MAKEFILE} ${MAKEFILE}.old
+ sed -e "s:${S}:${QTBASE}:g" ${MAKEFILE}.old > ${MAKEFILE}
+ rm -f ${MAKEFILE}.old
+ done
+
+ cp -r ${S}/tutorial ${D}/${QTBASE}
+ fi
+
+ if use immqt || use immqt-bc ; then
+ dodoc ${S}/README.immodule
+ fi
+
+ # misc build reqs
+ dodir ${QTBASE}/mkspecs
+ cp -R ${S}/mkspecs/${PLATFORM} ${D}/${QTBASE}/mkspecs/
+
+ sed -e "s:${S}:${QTBASE}:g" \
+ ${S}/.qmake.cache > ${D}${QTBASE}/.qmake.cache
+
+ if use ppc-macos ; then
+ dosed "s:linux-g++:${PLATFORM}:" /etc/env.d/45qt3 \
+ "s:\$(QTBASE):\$(QTDIR):g" ${QTBASE}/mkspecs/${PLATFORM}/qmake.conf \
+ "s:${S}:${QTBASE}:g" ${QTBASE}/mkspecs/${PLATFORM}/qmake.conf ${QTBASE}/lib/libqt-mt.la || die
+ fi
+
+ cp ${S}/tools/msg2qm/msg2qm ${D}/${QTBASE}/bin
+}