Skip to content

Commit

Permalink
support fractional scale (#2042)
Browse files Browse the repository at this point in the history
  • Loading branch information
lilydjwg authored Dec 1, 2023
1 parent 46dc800 commit 8f7787e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/api/wayfire/nonstd/wlroots-full.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ extern "C"
#include <wlr/types/wlr_relative_pointer_v1.h>
#include <wlr/types/wlr_text_input_v3.h>
#include <wlr/types/wlr_primary_selection_v1.h>
#include <wlr/types/wlr_fractional_scale_v1.h>

// Activation plugin
#include <wlr/types/wlr_xdg_activation_v1.h>
Expand Down
2 changes: 2 additions & 0 deletions src/core/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ void wf::compositor_core_impl_t::init()
protocols.foreign_v2 = wlr_xdg_foreign_v2_create(display,
protocols.foreign_registry);

wlr_fractional_scale_manager_v1_create(display, 1);

this->bindings = std::make_unique<bindings_repository_t>();
image_io::init();
OpenGL::init();
Expand Down
1 change: 1 addition & 0 deletions src/view/wlr-surface-node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ class wf::scene::wlr_surface_node_t::wlr_surface_render_instance_t : public rend
if (self->surface)
{
wlr_surface_send_enter(self->surface, visible_on->handle);
wlr_fractional_scale_v1_notify_scale(self->surface, visible_on->handle->scale);
}
}

Expand Down

0 comments on commit 8f7787e

Please sign in to comment.