Move Window::detectShape to X11Window
This commit is contained in:
parent
fa8bd5c0d9
commit
bf19234df3
5 changed files with 11 additions and 11 deletions
|
@ -371,7 +371,7 @@ bool X11Window::windowEvent(xcb_generic_event_t *e)
|
|||
break;
|
||||
default: {
|
||||
if (eventType == Xcb::Extensions::self()->shapeNotifyEvent()) {
|
||||
detectShape(window());
|
||||
detectShape();
|
||||
Q_EMIT geometryShapeChanged(frameGeometry());
|
||||
}
|
||||
if (eventType == Xcb::Extensions::self()->damageNotifyEvent()) {
|
||||
|
@ -554,7 +554,7 @@ bool X11Window::windowEvent(xcb_generic_event_t *e)
|
|||
}
|
||||
default:
|
||||
if (eventType == Xcb::Extensions::self()->shapeNotifyEvent() && reinterpret_cast<xcb_shape_notify_event_t *>(e)->affected_window == window()) {
|
||||
detectShape(window()); // workaround for #19644
|
||||
detectShape(); // workaround for #19644
|
||||
updateShape();
|
||||
}
|
||||
if (eventType == Xcb::Extensions::self()->damageNotifyEvent() && reinterpret_cast<xcb_damage_notify_event_t *>(e)->drawable == frameId()) {
|
||||
|
|
|
@ -168,11 +168,6 @@ QDebug operator<<(QDebug debug, const Window *window)
|
|||
return debug;
|
||||
}
|
||||
|
||||
void Window::detectShape(xcb_window_t id)
|
||||
{
|
||||
is_shape = Xcb::Extensions::self()->hasShape(id);
|
||||
}
|
||||
|
||||
QRectF Window::visibleGeometry() const
|
||||
{
|
||||
if (const WindowItem *item = windowItem()) {
|
||||
|
|
|
@ -1475,7 +1475,6 @@ Q_SIGNALS:
|
|||
|
||||
protected:
|
||||
void setWindowHandles(xcb_window_t client);
|
||||
void detectShape(xcb_window_t id);
|
||||
Xcb::Property fetchWmClientLeader() const;
|
||||
void readWmClientLeader(Xcb::Property &p);
|
||||
void getWmClientLeader();
|
||||
|
@ -1786,7 +1785,6 @@ protected:
|
|||
void cleanTabBox();
|
||||
|
||||
QStringList m_activityList;
|
||||
bool is_shape = false;
|
||||
|
||||
private Q_SLOTS:
|
||||
void shadeHover();
|
||||
|
|
|
@ -548,7 +548,7 @@ bool X11Window::track(xcb_window_t w)
|
|||
if (Xcb::Extensions::self()->isShapeAvailable()) {
|
||||
xcb_shape_select_input(kwinApp()->x11Connection(), w, true);
|
||||
}
|
||||
detectShape(w);
|
||||
detectShape();
|
||||
getWmOpaqueRegion();
|
||||
getSkipCloseAnimation();
|
||||
setupCompositing();
|
||||
|
@ -649,7 +649,7 @@ bool X11Window::manage(xcb_window_t w, bool isMapped)
|
|||
if (Xcb::Extensions::self()->isShapeAvailable()) {
|
||||
xcb_shape_select_input(kwinApp()->x11Connection(), window(), true);
|
||||
}
|
||||
detectShape(window());
|
||||
detectShape();
|
||||
detectNoBorder();
|
||||
fetchIconicName();
|
||||
setClientFrameExtents(info->gtkFrameExtents());
|
||||
|
@ -1528,6 +1528,11 @@ void X11Window::checkNoBorder()
|
|||
setNoBorder(app_noborder);
|
||||
}
|
||||
|
||||
void X11Window::detectShape()
|
||||
{
|
||||
is_shape = Xcb::Extensions::self()->hasShape(window());
|
||||
}
|
||||
|
||||
void X11Window::updateShape()
|
||||
{
|
||||
if (is_shape) {
|
||||
|
|
|
@ -180,6 +180,7 @@ public:
|
|||
|
||||
void invalidateDecoration() override;
|
||||
|
||||
void detectShape();
|
||||
void updateShape();
|
||||
|
||||
/// resizeWithChecks() resizes according to gravity, and checks workarea position
|
||||
|
@ -466,6 +467,7 @@ private:
|
|||
uint app_noborder : 1; ///< App requested no border via window type, shape extension, etc.
|
||||
uint ignore_focus_stealing : 1; ///< Don't apply focus stealing prevention to this client
|
||||
bool blocks_compositing;
|
||||
bool is_shape = false;
|
||||
|
||||
enum FullScreenMode {
|
||||
FullScreenNone,
|
||||
|
|
Loading…
Reference in a new issue