mirror of
https://invent.kde.org/plasma/layer-shell-qt.git
synced 2025-07-14 11:04:20 -04:00
Compare commits
2 Commits
v5.93.0
...
work/fuf/q
Author | SHA1 | Date | |
---|---|---|---|
b8a9938c0d | |||
f1e50306f8 |
@ -4,7 +4,7 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
project(layershellqt)
|
project(layershellqt)
|
||||||
set(PROJECT_VERSION "5.92.0")
|
set(PROJECT_VERSION "6.0.80")
|
||||||
set(PROJECT_VERSION_MAJOR 6)
|
set(PROJECT_VERSION_MAJOR 6)
|
||||||
|
|
||||||
set(CMAKE_C_STANDARD 99)
|
set(CMAKE_C_STANDARD 99)
|
||||||
|
@ -16,6 +16,31 @@
|
|||||||
|
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
template<typename T>
|
||||||
|
concept QWaylandWindowNewV6Type = requires(T t) { t.sendRecursiveExposeEvent(); };
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
concept QWaylandWindowOldV6Type = requires(T t) { t.handleExpose(QRect()); } && !requires(T t) { t.sendRecursiveExposeEvent(); };
|
||||||
|
|
||||||
|
class ExposeHelper
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
template<QWaylandWindowOldV6Type T>
|
||||||
|
[[maybe_unused]] ExposeHelper(T *window, const QSize &pendingSize)
|
||||||
|
{
|
||||||
|
window->handleExpose(QRect(QPoint(), pendingSize));
|
||||||
|
}
|
||||||
|
|
||||||
|
template<QWaylandWindowNewV6Type T>
|
||||||
|
[[maybe_unused]] ExposeHelper(T *window, [[maybe_unused]] const QSize &pendingSize)
|
||||||
|
{
|
||||||
|
window->sendRecursiveExposeEvent();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
namespace LayerShellQt
|
namespace LayerShellQt
|
||||||
{
|
{
|
||||||
QWaylandLayerSurface::QWaylandLayerSurface(QWaylandLayerShellIntegration *shell, QtWaylandClient::QWaylandWindow *window)
|
QWaylandLayerSurface::QWaylandLayerSurface(QWaylandLayerShellIntegration *shell, QtWaylandClient::QWaylandWindow *window)
|
||||||
@ -92,7 +117,7 @@ void QWaylandLayerSurface::zwlr_layer_surface_v1_configure(uint32_t serial, uint
|
|||||||
if (!m_configured) {
|
if (!m_configured) {
|
||||||
m_configured = true;
|
m_configured = true;
|
||||||
window()->resizeFromApplyConfigure(m_pendingSize);
|
window()->resizeFromApplyConfigure(m_pendingSize);
|
||||||
window()->handleExpose(QRect(QPoint(), m_pendingSize));
|
ExposeHelper helper(window(), m_pendingSize);
|
||||||
} else {
|
} else {
|
||||||
// Later configures are resizes, so we have to queue them up for a time when we
|
// Later configures are resizes, so we have to queue them up for a time when we
|
||||||
// are not painting to the window.
|
// are not painting to the window.
|
||||||
|
Reference in New Issue
Block a user