Version: v0.8.3 (using KDE 3.2.92 (3.3 beta2), compiled sources) Compiler: gcc version 3.3.3 20040412 (Gentoo Linux 3.3.3-r6, ssp-3.3.2-2, pie-8.7.6) OS: Linux (i686) release 2.6.7 I noticed that the KGet icon in Konqueror seemed to be different and decided to see if the drop target looked different as well. After selecting the "Show Drop Target" action in Konq, the drop target appeared, which was circular as usual, but now seems to suffer from graphical glitches. I will attach a screenshot of what I'm talking about as well. This also occurs if you open KGet manually, and choose "View -> Drop Target" from the menu.
Created attachment 6976 [details] Graphical distortion in KGet drop target This is what my drop target now looks like. Before I forget, I should probably mention that my X Server is x.org 6.7, using the fglrx driver.
Hi, I am using KDE 3.3 rc1 compilied from sources and I'm experencing the same problem as Mr. Pyne as my drop target looks exactly like the screenshot. I am also using x.org 6.7 but the savage4 graphic driver.
The same happens to me. I can confirm this. I'm using KDE 3.3.0 compiled from sources under Mandrakelinux 10.0.
Hi, I can also confirm this still happens in both stable 3.3.0 and the current CVS HEAD from 23/08/04.
*** Bug 87681 has been marked as a duplicate of this bug. ***
*** Bug 87542 has been marked as a duplicate of this bug. ***
I need to correct my previous statement. In stable 3.3.0 it happens but in the latest CVS HEAD the drop target now shows the same as it did in previous releases, the black arrow with the silver grey background.
The first problem is that the PNG file is too large. Attached PNG file will fix that. Then there is the background. I didn't add one but it appears that the transparent background does not work. I'm not sure exactly what is happening but it appears to be some attempt at transparency that doesn't work correctly since the background in different depending on where the drop target opens. -- JRT
Created attachment 7290 [details] kdenetwork/kget/pics/target.png I suggest adding a background to this. -- JRT
Poking around at the code, it appears that the code at line 150 of droptarget.cpp uses the XSHAPE extension, but the mask is assumed to be a circle instead of (in this case) an arrow shape. Perhaps the ctor should be modified to create the alpha mask from the transparency areas?
CVS commit by mpyne: Fix bug 86478 (Drop target has severe graphical artifacts) in HEAD. Now the code uses the drop target's own mask for the SHAPE extension instead of always using a circle. Although this is a bugfix, this has interesting possibilites regarding allowing the user to set their own drop target. Developers who have a hackergotchi may want to try replacing $KDEHOME/share/apps/kget/pics/target.png with their hackergotchi icon to turn your mug into a drop target. ;-) karli, you can change the icon to the arrow again if you'd like. This patch works for at least Matt Rogers and myself. CCMAIL:86478@bugs.kde.org M +10 -24 droptarget.cpp 1.24 --- kdenetwork/kget/droptarget.cpp #1.23:1.24 @@ -48,7 +48,4 @@ #include "settings.h" #include "droptarget.h" -#define TARGET_WIDTH 70 -#define TARGET_HEIGHT 69 - DropTarget::DropTarget():QWidget() @@ -58,9 +55,10 @@ DropTarget::DropTarget():QWidget() QRect desk = KGlobalSettings::desktopGeometry(this); + QPixmap bgnd = UserIcon( "target" ); if (x != -1 && x >= desk.left() && y >= desk.top() && - (x + TARGET_WIDTH) <= desk.right() && - (y + TARGET_HEIGHT) <= desk.bottom() ) + (x + bgnd.width()) <= desk.right() && + (y + bgnd.height()) <= desk.bottom() ) { move(ksettings.dropPosition); @@ -69,5 +67,5 @@ DropTarget::DropTarget():QWidget() else { - setGeometry(desk.x()+200, desk.y()+200, TARGET_WIDTH, TARGET_HEIGHT); + setGeometry(desk.x()+200, desk.y()+200, bgnd.width(), bgnd.height()); KWin::setState(winId(), NET::SkipTaskbar | NET::StaysOnTop); } @@ -75,28 +73,16 @@ DropTarget::DropTarget():QWidget() b_sticky = ksettings.dropState & NET::Sticky; - // setup mask - mask.resize(TARGET_WIDTH, TARGET_HEIGHT); - mask.fill(color0); - - QPainter p2; - - p2.begin(&mask); - p2.setBrush(color1); - p2.drawChord( 0, 0,TARGET_WIDTH,TARGET_HEIGHT,5760,5760); - p2.end(); - // setup pixmaps - int offsetx = -10; - int offsety = -5; + if (!bgnd.mask()) + kdError(5001) << "Drop target pixmap has no mask!\n"; + else + mask = *bgnd.mask(); - QPixmap bgnd = QPixmap(TARGET_WIDTH, TARGET_HEIGHT); - QPixmap tmp = UserIcon( "target" ); - bitBlt(&bgnd, offsetx, offsety, &tmp ); setBackgroundPixmap( bgnd ); // popup menu for right mouse button popupMenu = new KPopupMenu(); - popupMenu->setTitle(kapp->caption()); + popupMenu->insertTitle(kapp->caption()); popupMenu->setCheckable(true);
CVS commit by mpyne: Backport fix for bug 86478 (Drop target has severe graphical artifacts) to KDE 3.3. CCMAIL:86478-done@bugs.kde.org M +10 -24 droptarget.cpp 1.23.6.1 --- kdenetwork/kget/droptarget.cpp #1.23:1.23.6.1 @@ -48,7 +48,4 @@ #include "settings.h" #include "droptarget.h" -#define TARGET_WIDTH 70 -#define TARGET_HEIGHT 69 - DropTarget::DropTarget():QWidget() @@ -58,9 +55,10 @@ DropTarget::DropTarget():QWidget() QRect desk = KGlobalSettings::desktopGeometry(this); + QPixmap bgnd = UserIcon( "target" ); if (x != -1 && x >= desk.left() && y >= desk.top() && - (x + TARGET_WIDTH) <= desk.right() && - (y + TARGET_HEIGHT) <= desk.bottom() ) + (x + bgnd.width()) <= desk.right() && + (y + bgnd.height()) <= desk.bottom() ) { move(ksettings.dropPosition); @@ -69,5 +67,5 @@ DropTarget::DropTarget():QWidget() else { - setGeometry(desk.x()+200, desk.y()+200, TARGET_WIDTH, TARGET_HEIGHT); + setGeometry(desk.x()+200, desk.y()+200, bgnd.width(), bgnd.height()); KWin::setState(winId(), NET::SkipTaskbar | NET::StaysOnTop); } @@ -75,28 +73,16 @@ DropTarget::DropTarget():QWidget() b_sticky = ksettings.dropState & NET::Sticky; - // setup mask - mask.resize(TARGET_WIDTH, TARGET_HEIGHT); - mask.fill(color0); - - QPainter p2; - - p2.begin(&mask); - p2.setBrush(color1); - p2.drawChord( 0, 0,TARGET_WIDTH,TARGET_HEIGHT,5760,5760); - p2.end(); - // setup pixmaps - int offsetx = -10; - int offsety = -5; + if (!bgnd.mask()) + kdError(5001) << "Drop target pixmap has no mask!\n"; + else + mask = *bgnd.mask(); - QPixmap bgnd = QPixmap(TARGET_WIDTH, TARGET_HEIGHT); - QPixmap tmp = UserIcon( "target" ); - bitBlt(&bgnd, offsetx, offsety, &tmp ); setBackgroundPixmap( bgnd ); // popup menu for right mouse button popupMenu = new KPopupMenu(); - popupMenu->setTitle(kapp->caption()); + popupMenu->insertTitle(kapp->caption()); popupMenu->setCheckable(true);