[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

@ -75,6 +75,9 @@ Atoms::Atoms()
atoms[n] = &net_wm_window_shade; atoms[n] = &net_wm_window_shade;
names[n++] = (char*) "_KDE_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; Atom fake;
atoms[n] = &fake; atoms[n] = &fake;

View file

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

View file

@ -358,6 +358,7 @@ void Client::detectNoBorder()
default: default:
assert( false ); assert( false );
} }
setShapable(FALSE);
} }
void Client::updateFrameStrut() void Client::updateFrameStrut()
@ -419,12 +420,18 @@ void Client::setUserNoBorder( bool set )
void Client::updateShape() void Client::updateShape()
{ {
if ( shape() ) if ( shape() )
{
XShapeCombineShape(qt_xdisplay(), frameId(), ShapeBounding, XShapeCombineShape(qt_xdisplay(), frameId(), ShapeBounding,
clientPos().x(), clientPos().y(), clientPos().x(), clientPos().y(),
window(), ShapeBounding, ShapeSet); window(), ShapeBounding, ShapeSet);
setShapable(TRUE);
}
else else
{
XShapeCombineMask( qt_xdisplay(), frameId(), ShapeBounding, 0, 0, XShapeCombineMask( qt_xdisplay(), frameId(), ShapeBounding, 0, 0,
None, ShapeSet); None, ShapeSet);
setShapable(TRUE);
}
// workaround for #19644 - shaped windows shouldn't have decoration // workaround for #19644 - shaped windows shouldn't have decoration
if( shape() && !noBorder()) if( shape() && !noBorder())
{ {
@ -467,6 +474,12 @@ QRegion Client::mask() const
return QRegion( 0, 0, width(), height()); return QRegion( 0, 0, width(), height());
return _mask; 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 ) void Client::hideClient( bool hide )
{ {

View file

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

View file

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

View file

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