Initialize values needed for electric borders even in the only-move case.
(#79252). svn path=/trunk/kdebase/kwin/; revision=304267
This commit is contained in:
parent
425e10ed1d
commit
23ac6a4381
3 changed files with 19 additions and 16 deletions
|
@ -43,11 +43,7 @@ namespace KWinInternal
|
|||
void Workspace::desktopResized()
|
||||
{
|
||||
updateClientArea();
|
||||
if (options->electricBorders() == Options::ElectricAlways)
|
||||
{ // update electric borders
|
||||
destroyBorderWindows();
|
||||
createBorderWindows();
|
||||
}
|
||||
checkElectricBorders();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
@ -171,8 +171,7 @@ Workspace::Workspace( bool restore )
|
|||
|
||||
void Workspace::init()
|
||||
{
|
||||
if (options->electricBorders() == Options::ElectricAlways)
|
||||
createBorderWindows();
|
||||
checkElectricBorders();
|
||||
|
||||
supportWindow = new QWidget;
|
||||
XLowerWindow( qt_xdisplay(), supportWindow->winId()); // see usage in layers.cpp
|
||||
|
@ -758,10 +757,7 @@ void Workspace::slotReconfigure()
|
|||
forEachClient( CheckBorderSizesProcedure());
|
||||
}
|
||||
|
||||
if (options->electricBorders() == Options::ElectricAlways)
|
||||
createBorderWindows();
|
||||
else
|
||||
destroyBorderWindows();
|
||||
checkElectricBorders();
|
||||
|
||||
if( options->topMenuEnabled() && !managingTopMenus())
|
||||
{
|
||||
|
@ -1646,12 +1642,8 @@ QWidget* Workspace::desktopWidget()
|
|||
// borders. Technically this is done with input only windows. Since
|
||||
// electric borders can be switched on and off, we have these two
|
||||
// functions to create and destroy them.
|
||||
void Workspace::createBorderWindows()
|
||||
void Workspace::checkElectricBorders()
|
||||
{
|
||||
if ( electric_have_borders )
|
||||
return;
|
||||
|
||||
electric_have_borders = true;
|
||||
electric_current_border = 0;
|
||||
|
||||
QRect r = QApplication::desktop()->geometry();
|
||||
|
@ -1660,6 +1652,20 @@ void Workspace::createBorderWindows()
|
|||
electricLeft = r.left();
|
||||
electricRight = r.right();
|
||||
|
||||
if (options->electricBorders() == Options::ElectricAlways)
|
||||
createBorderWindows();
|
||||
else
|
||||
destroyBorderWindows();
|
||||
}
|
||||
|
||||
void Workspace::createBorderWindows()
|
||||
{
|
||||
if ( electric_have_borders )
|
||||
return;
|
||||
|
||||
electric_have_borders = true;
|
||||
|
||||
QRect r = QApplication::desktop()->geometry();
|
||||
XSetWindowAttributes attributes;
|
||||
unsigned long valuemask;
|
||||
attributes.override_redirect = True;
|
||||
|
|
|
@ -386,6 +386,7 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
|
|||
void tabBoxKeyRelease( const XKeyEvent& ev );
|
||||
|
||||
// electric borders
|
||||
void checkElectricBorders();
|
||||
void createBorderWindows();
|
||||
void destroyBorderWindows();
|
||||
void electricBorder(XEvent * e);
|
||||
|
|
Loading…
Reference in a new issue