don't move fullscreen windows around
svn path=/trunk/kdebase/kwin/; revision=59482icc-effect-5.14.5
parent
70f8d2823b
commit
813ee80842
17
client.cpp
17
client.cpp
|
@ -482,10 +482,12 @@ bool Client::manage( bool isMapped, bool doNotShow )
|
|||
if ( session )
|
||||
geom.setRect( session->x, session->y, session->width, session->height );
|
||||
|
||||
|
||||
if ( isMapped || session || isTransient() )
|
||||
if ( isMapped || session || isTransient() ) {
|
||||
placementDone = TRUE;
|
||||
else {
|
||||
if ( geom == QApplication::desktop()->geometry() )
|
||||
may_move = FALSE; // don't let fullscreen windows be moved around
|
||||
} else {
|
||||
qDebug("2");
|
||||
if ( (xSizeHint.flags & PPosition) || (xSizeHint.flags & USPosition) ) {
|
||||
if ( (xSizeHint.flags & USPosition) == 0 ) {
|
||||
QRect area = workspace()->clientArea();
|
||||
|
@ -1057,6 +1059,9 @@ QSize Client::sizeForWindowSize( const QSize& wsize, bool ignore_height) const
|
|||
*/
|
||||
bool Client::isResizable() const
|
||||
{
|
||||
if ( !isMovable() )
|
||||
return FALSE;
|
||||
|
||||
if ( ( xSizeHint.flags & PMaxSize) == 0 || (xSizeHint.flags & PMinSize ) == 0 )
|
||||
return TRUE;
|
||||
return ( xSizeHint.min_width != xSizeHint.max_width ) ||
|
||||
|
@ -2253,9 +2258,13 @@ bool Client::wantsTabFocus() const
|
|||
return windowType() == NET::Normal && input;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns whether the window is moveable or has a fixed
|
||||
position. !isMovable implies !isResizable.
|
||||
*/
|
||||
bool Client::isMovable() const
|
||||
{
|
||||
return windowType() == NET::Normal || windowType() == NET::Toolbar;
|
||||
return may_move && ( windowType() == NET::Normal || windowType() == NET::Toolbar );
|
||||
}
|
||||
|
||||
bool Client::isDesktop() const
|
||||
|
|
|
@ -2150,6 +2150,7 @@ void Workspace::clientPopupAboutToShow()
|
|||
if ( !popup_client || !popup )
|
||||
return;
|
||||
popup->setItemEnabled( Options::ResizeOp, popup_client->isResizable() );
|
||||
popup->setItemEnabled( Options::MoveOp, popup_client->isMovable() );
|
||||
popup->setItemEnabled( Options::MaximizeOp, popup_client->isResizable() && !popup_client->isTransient() );
|
||||
popup->setItemChecked( Options::MaximizeOp, popup_client->isMaximized() );
|
||||
popup->setItemChecked( Options::ShadeOp, popup_client->isShade() );
|
||||
|
|
Loading…
Reference in New Issue