Summary: | noatun "show playlist" option in Young Hickory sometimes hides playlist | ||
---|---|---|---|
Product: | [Unmaintained] noatun | Reporter: | mark |
Component: | general | Assignee: | Charles Samuels <charles> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
mark
2003-02-08 18:41:33 UTC
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(); } |