mirror of
https://github.com/swaywm/sway.git
synced 2026-04-22 06:46:27 -04:00
wp-fractional-scale-v1: Initial implementation
This commit is contained in:
parent
c85d9af2b6
commit
536df52a39
3 changed files with 6 additions and 0 deletions
|
|
@ -15,6 +15,7 @@
|
||||||
#include <wlr/types/wlr_drm_lease_v1.h>
|
#include <wlr/types/wlr_drm_lease_v1.h>
|
||||||
#include <wlr/types/wlr_drm.h>
|
#include <wlr/types/wlr_drm.h>
|
||||||
#include <wlr/types/wlr_export_dmabuf_v1.h>
|
#include <wlr/types/wlr_export_dmabuf_v1.h>
|
||||||
|
#include <wlr/types/wlr_fractional_scale_v1.h>
|
||||||
#include <wlr/types/wlr_gamma_control_v1.h>
|
#include <wlr/types/wlr_gamma_control_v1.h>
|
||||||
#include <wlr/types/wlr_idle.h>
|
#include <wlr/types/wlr_idle.h>
|
||||||
#include <wlr/types/wlr_layer_shell_v1.h>
|
#include <wlr/types/wlr_layer_shell_v1.h>
|
||||||
|
|
@ -201,6 +202,7 @@ bool server_init(struct sway_server *server) {
|
||||||
wlr_data_control_manager_v1_create(server->wl_display);
|
wlr_data_control_manager_v1_create(server->wl_display);
|
||||||
wlr_primary_selection_v1_device_manager_create(server->wl_display);
|
wlr_primary_selection_v1_device_manager_create(server->wl_display);
|
||||||
wlr_viewporter_create(server->wl_display);
|
wlr_viewporter_create(server->wl_display);
|
||||||
|
wlr_fractional_scale_manager_v1_create(server->wl_display);
|
||||||
|
|
||||||
struct wlr_xdg_foreign_registry *foreign_registry =
|
struct wlr_xdg_foreign_registry *foreign_registry =
|
||||||
wlr_xdg_foreign_registry_create(server->wl_display);
|
wlr_xdg_foreign_registry_create(server->wl_display);
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <wayland-server-core.h>
|
#include <wayland-server-core.h>
|
||||||
|
#include <wlr/types/wlr_fractional_scale_v1.h>
|
||||||
#include <wlr/types/wlr_linux_dmabuf_v1.h>
|
#include <wlr/types/wlr_linux_dmabuf_v1.h>
|
||||||
#include <wlr/types/wlr_output_layout.h>
|
#include <wlr/types/wlr_output_layout.h>
|
||||||
#include <wlr/types/wlr_subcompositor.h>
|
#include <wlr/types/wlr_subcompositor.h>
|
||||||
|
|
@ -1325,6 +1326,7 @@ static void surface_send_enter_iterator(struct wlr_surface *surface,
|
||||||
int x, int y, void *data) {
|
int x, int y, void *data) {
|
||||||
struct wlr_output *wlr_output = data;
|
struct wlr_output *wlr_output = data;
|
||||||
wlr_surface_send_enter(surface, wlr_output);
|
wlr_surface_send_enter(surface, wlr_output);
|
||||||
|
wlr_fractional_scale_v1_notify_scale(surface, wlr_output->scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void surface_send_leave_iterator(struct wlr_surface *surface,
|
static void surface_send_leave_iterator(struct wlr_surface *surface,
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
#include <wayland-server-core.h>
|
#include <wayland-server-core.h>
|
||||||
#include <wlr/render/wlr_renderer.h>
|
#include <wlr/render/wlr_renderer.h>
|
||||||
#include <wlr/types/wlr_buffer.h>
|
#include <wlr/types/wlr_buffer.h>
|
||||||
|
#include <wlr/types/wlr_fractional_scale_v1.h>
|
||||||
#include <wlr/types/wlr_output_layout.h>
|
#include <wlr/types/wlr_output_layout.h>
|
||||||
#include <wlr/types/wlr_server_decoration.h>
|
#include <wlr/types/wlr_server_decoration.h>
|
||||||
#include <wlr/types/wlr_subcompositor.h>
|
#include <wlr/types/wlr_subcompositor.h>
|
||||||
|
|
@ -1120,6 +1121,7 @@ void view_child_init(struct sway_view_child *child,
|
||||||
struct sway_workspace *workspace = container->pending.workspace;
|
struct sway_workspace *workspace = container->pending.workspace;
|
||||||
if (workspace) {
|
if (workspace) {
|
||||||
wlr_surface_send_enter(child->surface, workspace->output->wlr_output);
|
wlr_surface_send_enter(child->surface, workspace->output->wlr_output);
|
||||||
|
wlr_fractional_scale_v1_notify_scale(child->surface, workspace->output->wlr_output->scale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue