本文整理汇总了C++中kwin::WindowInfo::isMinimized方法的典型用法代码示例。如果您正苦于以下问题:C++ WindowInfo::isMinimized方法的具体用法?C++ WindowInfo::isMinimized怎么用?C++ WindowInfo::isMinimized使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kwin::WindowInfo
的用法示例。
在下文中一共展示了WindowInfo::isMinimized方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: showHide
/**
* Show/hide playlist global shortcut and PlayerWindow PlaylistButton connect to this slot
* RULES:
* 1. hidden & iconified -> deiconify & show @n
* 2. hidden & deiconified -> show @n
* 3. shown & iconified -> deiconify @n
* 4. shown & deiconified -> hide @n
* 5. don't hide if there is no tray icon or playerWindow. todo (I can't be arsed) @n
*
* @note isMinimized() can only be true if the window isShown()
* this has taken me hours to get right, change at your peril!
* there are more contingencies than you can believe
*/
void PlaylistWindow::showHide() //SLOT
{
const KWin::WindowInfo info = KWin::windowInfo( winId() );
const uint desktop = KWin::currentDesktop();
const bool isOnThisDesktop = info.isOnDesktop( desktop );
const bool isShaded = false;
if( isShaded )
{
KWin::clearState( winId(), NET::Shaded );
setShown( true );
}
if( !isOnThisDesktop )
{
KWin::setOnDesktop( winId(), desktop );
setShown( true );
}
else if( !info.isMinimized() && !isShaded ) setShown( !isShown() );
if( isShown() ) KWin::deIconifyWindow( winId() );
}
示例2: isReallyShown
bool PlaylistWindow::isReallyShown() const
{
const KWin::WindowInfo info = KWin::windowInfo( winId() );
return isShown() && !info.isMinimized() && info.isOnDesktop( KWin::currentDesktop() );
}