void ShadowHelper::uninstallX11Shadows(QWidget *widget) const { if (WId wid = qtcGetWid(widget)) { qtcX11ShadowUninstall(wid); } }
void BlurHelper::unregisterWidget(QWidget *widget) { widget->removeEventFilter(this); if (isTransparent(widget)) { clear(qtcGetWid(widget)); } }
void ShadowHelper::uninstallX11Shadows(QWidget *widget) const { // DO NOT condition compile on QTC_ENABLE_X11. // There's no direct linkage on X11 and the following code will just do // nothing if X11 is not enabled (either at compile time or at run time). QTC_RET_IF_FAIL(qtcX11Enabled()); if (WId wid = qtcGetWid(widget)) { qtcX11ShadowUninstall(wid); } }
bool ShadowHelper::installX11Shadows(QWidget *widget) { if (WId wid = qtcGetWid(widget)) { if (widget->windowType() == Qt::ToolTip && widget->inherits("QBalloonTip")) { bool atTop = true; int margin = qtcGetBalloonMargin(widget, &atTop); int margins[4] = {0, 0, 0, 0}; // KWin's shadows margin order is top, right, bottom, left.. margins[atTop ? 0 : 2] = margin; qtcX11ShadowInstall(wid, margins); } else { qtcX11ShadowInstall(wid); } return true; } return false; }
bool ShadowHelper::installX11Shadows(QWidget *widget) { // DO NOT condition compile on QTC_ENABLE_X11. // There's no direct linkage on X11 and the following code will just do // nothing if X11 is not enabled (either at compile time or at run time). QTC_RET_IF_FAIL(qtcX11Enabled(), false); if (WId wid = qtcGetWid(widget)) { if (widget->windowType() == Qt::ToolTip && widget->inherits("QBalloonTip")) { bool atTop = true; int margin = qtcGetBalloonMargin(widget, &atTop); int margins[4] = {0, 0, 0, 0}; // KWin's shadows margin order is top, right, bottom, left.. margins[atTop ? 0 : 2] = margin; qtcX11ShadowInstall(wid, margins); } else { qtcX11ShadowInstall(wid); } return true; } return false; }