mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-04-06 07:15:53 -04:00
添加客户端缩放函数
This commit is contained in:
parent
5e332b0426
commit
2f8a6285b2
2 changed files with 8 additions and 0 deletions
7
client.h
7
client.h
|
|
@ -313,6 +313,13 @@ static inline void client_set_fullscreen(Client *c, int fullscreen) {
|
||||||
wlr_xdg_toplevel_set_fullscreen(c->surface.xdg->toplevel, fullscreen);
|
wlr_xdg_toplevel_set_fullscreen(c->surface.xdg->toplevel, fullscreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
client_set_scale(struct wlr_surface *s, float scale)
|
||||||
|
{
|
||||||
|
wlr_fractional_scale_v1_notify_scale(s, scale);
|
||||||
|
wlr_surface_set_preferred_buffer_scale(s, (int32_t)ceilf(scale));
|
||||||
|
}
|
||||||
|
|
||||||
static inline uint32_t client_set_size(Client *c, uint32_t width,
|
static inline uint32_t client_set_size(Client *c, uint32_t width,
|
||||||
uint32_t height) {
|
uint32_t height) {
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
|
|
|
||||||
1
maomao.c
1
maomao.c
|
|
@ -12,6 +12,7 @@
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <wlr/types/wlr_fractional_scale_v1.h>
|
||||||
#include <wayland-server-core.h>
|
#include <wayland-server-core.h>
|
||||||
#include <wlr/backend.h>
|
#include <wlr/backend.h>
|
||||||
#include <wlr/backend/libinput.h>
|
#include <wlr/backend/libinput.h>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue