[kompmgr] removed /kompmgr/ shapable tag if only the deco is shaped

svn path=/trunk/kdebase/kwin/; revision=380839
This commit is contained in:
Thomas Lübking 2005-01-21 16:19:10 +00:00
parent bb92b37e08
commit 270a071454
6 changed files with 20 additions and 0 deletions

View file

@ -76,6 +76,9 @@ Atoms::Atoms()
atoms[n] = &net_wm_window_shade;
names[n++] = (char*) "_KDE_WM_WINDOW_SHADE";
atoms[n] = &net_wm_window_shapable;
names[n++] = (char*) "_KDE_WM_WINDOW_SHAPABLE";
Atom fake;
atoms[n] = &fake;
names[n++] = (char *) "_DT_SM_WINDOW_INFO";

View file

@ -40,6 +40,7 @@ class Atoms
Atom net_wm_window_opacity;
Atom net_wm_window_shadow;
Atom net_wm_window_shade;
Atom net_wm_window_shapable;
Atom xdnd_aware;
Atom xdnd_position;
};

View file

@ -358,6 +358,7 @@ void Client::detectNoBorder()
default:
assert( false );
}
setShapable(FALSE);
}
void Client::updateFrameStrut()
@ -419,12 +420,18 @@ void Client::setUserNoBorder( bool set )
void Client::updateShape()
{
if ( shape() )
{
XShapeCombineShape(qt_xdisplay(), frameId(), ShapeBounding,
clientPos().x(), clientPos().y(),
window(), ShapeBounding, ShapeSet);
setShapable(TRUE);
}
else
{
XShapeCombineMask( qt_xdisplay(), frameId(), ShapeBounding, 0, 0,
None, ShapeSet);
setShapable(TRUE);
}
// workaround for #19644 - shaped windows shouldn't have decoration
if( shape() && !noBorder())
{
@ -468,6 +475,12 @@ QRegion Client::mask() const
return _mask;
}
void Client::setShapable(bool b)
{
uint tmp = b?1:0;
XChangeProperty(qt_xdisplay(), frameId(), atoms->net_wm_window_shapable, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &tmp, 1L);
}
void Client::hideClient( bool hide )
{
if( hidden == hide )

View file

@ -292,6 +292,7 @@ class Client : public QObject, public KDecorationDefines
bool isBMP();
void setBMP(bool b);
bool touches(const Client* c);
void setShapable(bool b);
private slots:
void autoRaise();

View file

@ -186,6 +186,7 @@ unsigned long Options::updateSettings()
activeWindowShadowSize = config->readNumEntry("ActiveWindowShadowSize", 100);
inactiveWindowShadowSize = config->readNumEntry("InactiveWindowShadowSize", 100);
dockShadowSize = config->readNumEntry("DockShadowSize", 100);
removeShadowsOnResize = config->readBoolEntry("RemoveShadowsOnResize", true);
if (resetKompmgr = config->readBoolEntry("ResetKompmgr", false))
config->writeEntry("ResetKompmgr",FALSE);

View file

@ -264,6 +264,7 @@ class Options : public KDecorationOptions
uint inactiveWindowOpacity;
bool translucentMovingWindows;
uint movingWindowOpacity;
bool removeShadowsOnResize;
bool translucentDocks;
uint dockOpacity;
bool keepAboveAsActive;