twin: remove "Apply translucency only to decoration" option

The option has been broken for more than a decade (since replacement of
kompmgr with compton-tde) and it is nontrivial to fix it.

Closes: https://mirror.git.trinitydesktop.org/gitea/TDE/tdebase/issues/706
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit 9a43bf37b9)
r14.1.x
Alexander Golubev 1 week ago
parent 78abe1817e
commit 3f1bf5f9b7

@ -328,9 +328,6 @@ void Client::updateDecoration( bool check_workspace_pos, bool force )
XReparentWindow( tqt_xdisplay(), decoration->widget()->winId(), frameId(), 0, 0 );
decoration->widget()->lower();
decoration->borders( border_left, border_right, border_top, border_bottom );
options->onlyDecoTranslucent ?
setDecoHashProperty(border_top, border_right, border_bottom, border_left):
unsetDecoHashProperty();
int save_workarea_diff_x = workarea_diff_x;
int save_workarea_diff_y = workarea_diff_y;
move( calculateGravitation( false ));
@ -387,9 +384,6 @@ void Client::checkBorderSizes()
border_right != new_right ||
border_top != new_top ||
border_bottom != new_bottom)
options->onlyDecoTranslucent ?
setDecoHashProperty(new_top, new_right, new_bottom, new_left):
unsetDecoHashProperty();
move( calculateGravitation( false ));
plainResize( sizeForClientSize( clientSize()), ForceGeometrySet );
checkWorkspacePosition();
@ -2991,20 +2985,6 @@ bool Client::touches(const Client* c)
return false;
}
void Client::setDecoHashProperty(uint topHeight, uint rightWidth, uint bottomHeight, uint leftWidth)
{
long data = (topHeight < 255 ? topHeight : 255) << 24 |
(rightWidth < 255 ? rightWidth : 255) << 16 |
(bottomHeight < 255 ? bottomHeight : 255) << 8 |
(leftWidth < 255 ? leftWidth : 255);
XChangeProperty(tqt_xdisplay(), frameId(), atoms->net_wm_window_decohash, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &data, 1L);
}
void Client::unsetDecoHashProperty()
{
XDeleteProperty( tqt_xdisplay(), frameId(), atoms->net_wm_window_decohash);
}
#ifndef NDEBUG
kdbgstream& operator<<( kdbgstream& stream, const Client* cl )
{

@ -462,8 +462,6 @@ class Client : public TQObject, public KDecorationDefines
void ungrabButton( int mod );
void resetMaximize();
void resizeDecoration( const TQSize& s );
void setDecoHashProperty(uint topHeight, uint rightWidth, uint bottomHeight, uint leftWidth);
void unsetDecoHashProperty();
void pingWindow();
void killProcess( bool ask, Time timestamp = CurrentTime );

@ -1460,11 +1460,6 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config,
TQVBoxLayout *vLay = new TQVBoxLayout (tGroup,KDialog::marginHint(), KDialog::spacingHint());
vLay->addSpacing(11); // to get the proper gb top offset
onlyDecoTranslucent = new TQCheckBox(i18n("Apply translucency only to decoration"),tGroup);
vLay->addWidget(onlyDecoTranslucent);
vLay->addSpacing(11);
TQGridLayout *gLay = new TQGridLayout(vLay,4,2,KDialog::spacingHint());
gLay->setColStretch(1,1);
@ -1648,7 +1643,6 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config,
connect(dockWindowTransparency, TQ_SIGNAL(toggled(bool)), dockWindowOpacity, TQ_SLOT(setEnabled(bool)));
connect(useTranslucency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
connect(onlyDecoTranslucent, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
connect(activeWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
connect(inactiveWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
connect(movingWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
@ -1757,7 +1751,6 @@ void KTranslucencyConfig::load( void )
removeShadowsOnResize->setChecked(config->readBoolEntry("RemoveShadowsOnResize",false));
dockWindowTransparency->setChecked(config->readBoolEntry("TranslucentDocks",false));
keepAboveAsActive->setChecked(config->readBoolEntry("TreatKeepAboveAsActive",true));
onlyDecoTranslucent->setChecked(config->readBoolEntry("OnlyDecoTranslucent",false));
activeWindowOpacity->setValue(config->readNumEntry("ActiveWindowOpacity",100));
inactiveWindowOpacity->setValue(config->readNumEntry("InactiveWindowOpacity",75));
@ -1849,7 +1842,6 @@ void KTranslucencyConfig::save( void )
config->writeEntry("RemoveShadowsOnMove",removeShadowsOnMove->isChecked());
config->writeEntry("RemoveShadowsOnResize",removeShadowsOnResize->isChecked());
config->writeEntry("OnlyDecoTranslucent", onlyDecoTranslucent->isChecked());
config->writeEntry("ResetKompmgr",resetKompmgr_);
TDEConfig *conf_ = new TDEConfig(TQDir::homeDirPath() + "/.xcompmgrrc");
@ -1981,7 +1973,6 @@ void KTranslucencyConfig::defaults()
if (!kompmgrAvailable_)
return;
useTranslucency->setChecked(false);
onlyDecoTranslucent->setChecked(false);
activeWindowTransparency->setChecked(false);
inactiveWindowTransparency->setChecked(false);
movingWindowTransparency->setChecked(false);

@ -304,7 +304,6 @@ private:
TQCheckBox *removeShadowsOnResize;
TQCheckBox *removeShadowsOnMove;
TQGroupBox *sGroup;
TQCheckBox *onlyDecoTranslucent;
// TQPushButton *xcompmgrButton;
KIntNumInput *activeWindowOpacity;
KIntNumInput *inactiveWindowOpacity;

@ -202,7 +202,6 @@ unsigned long Options::updateSettings()
menuShadowSize = config->readNumEntry("MenuShadowSize", 1*100);
removeShadowsOnMove = config->readBoolEntry("RemoveShadowsOnMove", false);
removeShadowsOnResize = config->readBoolEntry("RemoveShadowsOnResize", false);
onlyDecoTranslucent = config->readBoolEntry("OnlyDecoTranslucent",false);
resetKompmgr = config->readBoolEntry("ResetKompmgr", false);
if (resetKompmgr)
config->writeEntry("ResetKompmgr",false);

@ -361,7 +361,7 @@ class Options : public KDecorationOptions
uint inactiveWindowShadowSize;
uint dockShadowSize;
uint menuShadowSize;
bool onlyDecoTranslucent;
bool onlyDecoTranslucent; //< not used; keep for binary compatibility
bool resetKompmgr;
bool tabboxOutline;

Loading…
Cancel
Save