0489d4a2f6
The Workspace has two stacks - one with managed windows and deleted windows, the other includes windows from the first stack + override redirect windows. This change merges both stacks. It has several benefits - we will be able to move window elevation stuff to Workspace and streamline the scene stuff, for example it will be possible to have a root item. Another advantage is that unmanaged windows will have Window::stackingOrder() property set, which can be useful in the future in qml effects or (qtquick scene if we push harder in that front). Another advantage is that kwin will make less X11 calls when restacking managed windows.
78 lines
2.7 KiB
C++
78 lines
2.7 KiB
C++
/*
|
|
KWin - the KDE window manager
|
|
This file is part of the KDE project.
|
|
|
|
SPDX-FileCopyrightText: 2006 Lubos Lunak <l.lunak@kde.org>
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#ifndef KWIN_UNMANAGED_H
|
|
#define KWIN_UNMANAGED_H
|
|
|
|
#include <netwm.h>
|
|
|
|
#include "window.h"
|
|
|
|
namespace KWin
|
|
{
|
|
|
|
class KWIN_EXPORT Unmanaged : public Window
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit Unmanaged();
|
|
bool windowEvent(xcb_generic_event_t *e);
|
|
bool track(xcb_window_t w);
|
|
bool hasScheduledRelease() const;
|
|
static void deleteUnmanaged(Unmanaged *c);
|
|
int desktop() const override;
|
|
QStringList activities() const override;
|
|
QVector<VirtualDesktop *> desktops() const override;
|
|
QPoint clientPos() const override;
|
|
NET::WindowType windowType(bool direct = false, int supported_types = 0) const override;
|
|
bool isOutline() const override;
|
|
bool isUnmanaged() const override;
|
|
|
|
QString captionNormal() const override { return {}; }
|
|
QString captionSuffix() const override { return {}; }
|
|
bool isCloseable() const override { return false; }
|
|
bool isShown() const override { return false; }
|
|
bool isHiddenInternal() const override { return false; }
|
|
void hideClient() override { /* nothing to do */ }
|
|
void showClient() override { /* nothing to do */ }
|
|
Window *findModal(bool /*allow_itself*/) override { return nullptr; }
|
|
bool isResizable() const override { return false; }
|
|
bool isMovable() const override { return false; }
|
|
bool isMovableAcrossScreens() const override { return false; }
|
|
bool takeFocus() override { return false; }
|
|
bool wantsInput() const override { return false; }
|
|
void killWindow() override { /* nothing to do */ }
|
|
void destroyWindow() override { /* nothing to do */ }
|
|
void closeWindow() override { /* nothing to do */ }
|
|
bool acceptsFocus() const override { return false; }
|
|
bool belongsToSameApplication(const Window *other, SameApplicationChecks /*checks*/) const override { return other == this; }
|
|
void moveResizeInternal(const QRect & /*rect*/, KWin::Window::MoveResizeMode /*mode*/) override { /* nothing to do */ }
|
|
void updateCaption() override { /* nothing to do */ }
|
|
void resizeWithChecks(const QSize&) override { /* nothing to do */ }
|
|
WindowItem *createItem() override;
|
|
|
|
public Q_SLOTS:
|
|
void release(ReleaseReason releaseReason = ReleaseReason::Release);
|
|
|
|
private:
|
|
~Unmanaged() override; // use release()
|
|
// handlers for X11 events
|
|
void configureNotifyEvent(xcb_configure_notify_event_t *e);
|
|
void damageNotifyEvent();
|
|
QWindow *findInternalWindow() const;
|
|
void checkOutput();
|
|
void associate();
|
|
void initialize();
|
|
bool m_outline = false;
|
|
bool m_scheduledRelease = false;
|
|
};
|
|
|
|
} // namespace
|
|
|
|
#endif
|