forked from quickshell/quickshell
hyprland/surface: add hyprland surface opacity support
This commit is contained in:
parent
08836ca1f3
commit
3a40174ed6
14 changed files with 476 additions and 2 deletions
19
src/wayland/hyprland/surface/surface.cpp
Normal file
19
src/wayland/hyprland/surface/surface.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "surface.hpp"
|
||||
|
||||
#include <qtypes.h>
|
||||
#include <qwayland-hyprland-surface-v1.h>
|
||||
#include <wayland-hyprland-surface-v1-client-protocol.h>
|
||||
#include <wayland-util.h>
|
||||
|
||||
namespace qs::hyprland::surface::impl {
|
||||
|
||||
HyprlandSurface::HyprlandSurface(::hyprland_surface_v1* surface)
|
||||
: QtWayland::hyprland_surface_v1(surface) {}
|
||||
|
||||
HyprlandSurface::~HyprlandSurface() { this->destroy(); }
|
||||
|
||||
void HyprlandSurface::setOpacity(qreal opacity) {
|
||||
this->set_opacity(wl_fixed_from_double(opacity));
|
||||
}
|
||||
|
||||
} // namespace qs::hyprland::surface::impl
|
Loading…
Add table
Add a link
Reference in a new issue