Make Toplevel::isClient() return true for internal and wayland windows
It's needed to merge Toplevel and AbstractClient. Previously, we couldn't do it because Toplevel::isClient() was somewhat widely used.
This commit is contained in:
parent
93d95ffbc4
commit
fa66c3d238
9 changed files with 17 additions and 5 deletions
|
@ -47,7 +47,7 @@ var dimScreenEffect = {
|
|||
if (window.popupWindow) {
|
||||
return;
|
||||
}
|
||||
if (window.x11Client && !window.managed) {
|
||||
if (!window.managed) {
|
||||
return;
|
||||
}
|
||||
if (window.dimAnimation) {
|
||||
|
|
|
@ -41,7 +41,7 @@ class FadeEffect {
|
|||
if (w.popupWindow) {
|
||||
return false;
|
||||
}
|
||||
if (w.x11Client && !w.managed) {
|
||||
if (!w.managed) {
|
||||
return false;
|
||||
}
|
||||
if (!w.visible) {
|
||||
|
|
|
@ -37,7 +37,7 @@ function isPopupWindow(window) {
|
|||
// Override-redirect windows are usually used for user interface
|
||||
// concepts that are expected to be animated by this effect, e.g.
|
||||
// popups that contain window thumbnails on X11, etc.
|
||||
if (window.x11Client && !window.managed) {
|
||||
if (!window.managed) {
|
||||
// Some utility windows can look like popup windows (e.g. the
|
||||
// address bar dropdown in Firefox), but we don't want to fade
|
||||
// them because the fade effect didn't do that.
|
||||
|
|
|
@ -71,7 +71,7 @@ class ScaleEffect {
|
|||
|
||||
// Override-redirect windows are usually used for user interface
|
||||
// concepts that are not expected to be animated by this effect.
|
||||
if (window.x11Client && !window.managed) {
|
||||
if (!window.managed) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ var translucencyEffect = {
|
|||
}
|
||||
if (window === effects.activeWindow ||
|
||||
window.popup === true ||
|
||||
(window.x11Client === true && window.managed === false) ||
|
||||
window.managed === false ||
|
||||
window.desktopWindow === true ||
|
||||
window.dock === true ||
|
||||
window.visible === false ||
|
||||
|
|
|
@ -68,6 +68,11 @@ InternalClient::~InternalClient()
|
|||
{
|
||||
}
|
||||
|
||||
bool InternalClient::isClient() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool InternalClient::hitTest(const QPoint &point) const
|
||||
{
|
||||
if (!AbstractClient::hitTest(point)) {
|
||||
|
|
|
@ -32,6 +32,7 @@ public:
|
|||
QRect transparentRect() const override;
|
||||
NET::WindowType windowType(bool direct = false, int supported_types = 0) const override;
|
||||
void killWindow() override;
|
||||
bool isClient() const override;
|
||||
bool isPopupWindow() const override;
|
||||
QByteArray windowRole() const override;
|
||||
void closeWindow() override;
|
||||
|
|
|
@ -75,6 +75,11 @@ pid_t WaylandClient::pid() const
|
|||
return surface()->client()->processId();
|
||||
}
|
||||
|
||||
bool WaylandClient::isClient() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool WaylandClient::isLockScreen() const
|
||||
{
|
||||
return surface()->client() == waylandServer()->screenLockerClientConnection();
|
||||
|
|
|
@ -22,6 +22,7 @@ public:
|
|||
QString captionSuffix() const override;
|
||||
QRect transparentRect() const override;
|
||||
pid_t pid() const override;
|
||||
bool isClient() const override;
|
||||
bool isLockScreen() const override;
|
||||
bool isLocalhost() const override;
|
||||
AbstractClient *findModal(bool allow_itself = false) override;
|
||||
|
|
Loading…
Reference in a new issue