Version: (using KDE KDE 3.0.99) Installed from: Debian stable Packages OS: Linux My housemate Matt and I are both fans of Noatun and have been confused by this bug. What happens is that sometimes we have to click "show playlist" twice from the Young Hickory interface before the playlist appears. I understand now what's been happening and how to fix it. If the playlist is maximized somewhere (whether I can see it or not), the "Show Playlist" function actually /hides/ the playlist. It has to be selected a second time to actually show it to you. The way it seems like it should work to me is that the the "Show Playlist" function should always try to open the playlist, maximize it, and bring it to the front.. If it's already in front of you and you want to hide it, you can use the standard KDE window widgets for that.
It's caused by when it gets to another desktop, or is otherwise put into state where it's marked as "visible" even though it's not actually visible. I'm not sure how to fix this, does NETWM provide such events?
This problem also applies to all gui plugins, their buttons get set to "off" status as soon as you move the playlist onto another desktop. If just KWin devel could give us a hint on how to solve this... :(
This code does it for the iList playlist. It also makes iList the active window when it is hidden behind other windows on the current desktop. This may be unwanted though. WId id = m_window->winId(); KWin::WindowInfo info = KWin::windowInfo(id); if (!info.isOnCurrentDesktop()) { KWin::setOnDesktop(id, KWin::currentDesktop()); KWin::activateWindow(id); showList(); } else if (!listVisible()) { showList(); } else if (!m_window->isActiveWindow()) { KWin::activateWindow(id); } else { hideList(); }
CVS commit by metz: - return false for listVisible() if the window is minimized/shaded/on another desktop/hidden - make sure the playlist window opens on current desktop on showList(), opening on another desktop is too confusing TODO: also unshade a shaded window on showList(), I cannot test this right now because kwin is awfully broken and crashes all the time when showing shaded+hidden windows again. BUG: 54303 M +5 -1 playlist.cpp 1.53 --- kdemultimedia/noatun/modules/splitplaylist/playlist.cpp #1.52:1.53 @@ -6,4 +6,5 @@ #include <krandomsequence.h> #include <kdebug.h> +#include <kwin.h> #include <kiconloader.h> @@ -168,12 +169,15 @@ PlaylistItem SplitPlaylist::getAfter(con bool SplitPlaylist::listVisible() const { - return view->isVisible(); + KWin::WindowInfo info = KWin::windowInfo(view->winId()); + return !(info.hasState(NET::Shaded) || info.hasState(NET::Hidden) || !info.valid() || !info.isOnCurrentDesktop()); } void SplitPlaylist::showList() { + KWin::setOnDesktop(view->winId(), KWin::currentDesktop()); view->show(); if (view->isMinimized()) view->showNormal(); + view->raise(); }