Compare commits

..

3 Commits

Author SHA1 Message Date
2860b6f48b Put toggle touch behind ifdef 2024-08-30 17:14:46 -07:00
f9aafbd339 Merge branch 'main' of https://codeberg.org/dwl/dwl 2024-07-25 18:50:20 -07:00
Leonardo Hernández Hernández
cd216908a7
send scale on initial commit to layer surfaces
Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me>
2024-07-24 06:25:54 -05:00

9
dwl.c
View File

@ -359,7 +359,9 @@ static void startdrag(struct wl_listener *listener, void *data);
static void tag(const Arg *arg); static void tag(const Arg *arg);
static void tagmon(const Arg *arg); static void tagmon(const Arg *arg);
static void tile(Monitor *m); static void tile(Monitor *m);
#ifdef HAS_TOGGLE_TOUCH
static void toggle_touch_input_device(const Arg *arg); static void toggle_touch_input_device(const Arg *arg);
#endif
static void togglebar(const Arg *arg); static void togglebar(const Arg *arg);
static void togglefloating(const Arg *arg); static void togglefloating(const Arg *arg);
static void togglefullscreen(const Arg *arg); static void togglefullscreen(const Arg *arg);
@ -791,6 +793,9 @@ commitlayersurfacenotify(struct wl_listener *listener, void *data)
struct wlr_layer_surface_v1_state old_state; struct wlr_layer_surface_v1_state old_state;
if (l->layer_surface->initial_commit) { if (l->layer_surface->initial_commit) {
wlr_fractional_scale_v1_notify_scale(layer_surface->surface, l->mon->wlr_output->scale);
wlr_surface_set_preferred_buffer_scale(layer_surface->surface, (int32_t)ceilf(l->mon->wlr_output->scale));
/* Temporarily set the layer's current state to pending /* Temporarily set the layer's current state to pending
* so that we can easily arrange it */ * so that we can easily arrange it */
old_state = l->layer_surface->current; old_state = l->layer_surface->current;
@ -973,8 +978,6 @@ createlayersurface(struct wl_listener *listener, void *data)
wl_list_insert(&l->mon->layers[layer_surface->pending.layer],&l->link); wl_list_insert(&l->mon->layers[layer_surface->pending.layer],&l->link);
wlr_surface_send_enter(surface, layer_surface->output); wlr_surface_send_enter(surface, layer_surface->output);
wlr_fractional_scale_v1_notify_scale(surface, l->mon->wlr_output->scale);
wlr_surface_set_preferred_buffer_scale(surface, (int32_t)ceilf(l->mon->wlr_output->scale));
} }
void void
@ -2977,6 +2980,7 @@ tile(Monitor *m)
} }
} }
#ifdef HAS_TOGGLE_TOUCH
void void
toggle_touch_input_device(const Arg *arg) { toggle_touch_input_device(const Arg *arg) {
if (cfg_disable_touchpad) { if (cfg_disable_touchpad) {
@ -2992,6 +2996,7 @@ toggle_touch_input_device(const Arg *arg) {
libinput_device_get_id_vendor(touch_input_device), libinput_device_get_id_vendor(touch_input_device),
libinput_device_get_id_product(touch_input_device)); libinput_device_get_id_product(touch_input_device));
} }
#endif
void void
togglebar(const Arg *arg) { togglebar(const Arg *arg) {