One more of "When a window resizes, first try to keep it inside its xinerama screen."
svn path=/trunk/KDE/kdebase/workspace/; revision=528602
This commit is contained in:
parent
5d1255dd73
commit
7f04417ad5
1 changed files with 14 additions and 0 deletions
14
geometry.cpp
14
geometry.cpp
|
@ -1248,7 +1248,21 @@ void Client::getWmNormalHints()
|
||||||
{ // update to match restrictions
|
{ // update to match restrictions
|
||||||
QSize new_size = adjustedSize();
|
QSize new_size = adjustedSize();
|
||||||
if( new_size != size() && !isFullScreen())
|
if( new_size != size() && !isFullScreen())
|
||||||
|
{
|
||||||
|
QRect orig_geometry = geometry();
|
||||||
resizeWithChecks( new_size );
|
resizeWithChecks( new_size );
|
||||||
|
if( ( !isSpecialWindow() || isToolbar()) && !isFullScreen())
|
||||||
|
{
|
||||||
|
// try to keep the window in its xinerama screen if possible,
|
||||||
|
// if that fails at least keep it visible somewhere
|
||||||
|
QRect area = workspace()->clientArea( MovementArea, this );
|
||||||
|
if( area.contains( orig_geometry ))
|
||||||
|
keepInArea( area );
|
||||||
|
area = workspace()->clientArea( WorkArea, this );
|
||||||
|
if( area.contains( orig_geometry ))
|
||||||
|
keepInArea( area );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
updateAllowedActions(); // affects isResizeable()
|
updateAllowedActions(); // affects isResizeable()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue