forked from quickshell/quickshell
core/window: move input mask handling + commit scheduling to polish
This commit is contained in:
parent
d6b58521e9
commit
6464ead0f1
7 changed files with 76 additions and 32 deletions
|
@ -62,7 +62,7 @@ void HyprlandWindow::setOpacity(qreal opacity) {
|
|||
|
||||
if (this->surface) {
|
||||
this->surface->setOpacity(opacity);
|
||||
qs::wayland::util::scheduleCommit(this->mWaylandWindow);
|
||||
qs::wayland::util::scheduleCommit(this->proxyWindow);
|
||||
}
|
||||
|
||||
emit this->opacityChanged();
|
||||
|
@ -127,7 +127,7 @@ void HyprlandWindow::onWaylandSurfaceCreated() {
|
|||
|
||||
if (this->mOpacity != 1.0) {
|
||||
this->surface->setOpacity(this->mOpacity);
|
||||
qs::wayland::util::scheduleCommit(this->mWaylandWindow);
|
||||
qs::wayland::util::scheduleCommit(this->proxyWindow);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,17 +1,9 @@
|
|||
#include "util.hpp"
|
||||
|
||||
#include <private/qwaylandwindow_p.h>
|
||||
#include <qpa/qwindowsysteminterface.h>
|
||||
#include "../window/proxywindow.hpp"
|
||||
|
||||
namespace qs::wayland::util {
|
||||
|
||||
void scheduleCommit(QtWaylandClient::QWaylandWindow* window) {
|
||||
// This seems to be one of the less offensive ways to force Qt to send a wl_surface.commit on its own terms.
|
||||
// Ideally we would trigger the commit more directly.
|
||||
QWindowSystemInterface::handleExposeEvent(
|
||||
window->window(),
|
||||
QRect(QPoint(), window->geometry().size())
|
||||
);
|
||||
}
|
||||
void scheduleCommit(ProxyWindowBase* window) { window->schedulePolish(); }
|
||||
|
||||
} // namespace qs::wayland::util
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <private/qwaylandwindow_p.h>
|
||||
#include "../window/proxywindow.hpp"
|
||||
|
||||
namespace qs::wayland::util {
|
||||
|
||||
void scheduleCommit(QtWaylandClient::QWaylandWindow* window);
|
||||
void scheduleCommit(ProxyWindowBase* window);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue