mirror of
https://github.com/jjsullivan5196/wvkbd.git
synced 2025-03-13 02:42:47 +01:00
resize keyboard only when entered to different output
the keyboard layout is saved even when hide/show (if output is same). this is old behavior.
This commit is contained in:
parent
a126945401
commit
5471e2ea0e
4
main.c
4
main.c
@ -342,12 +342,16 @@ void
|
|||||||
wl_surface_enter(void *data, struct wl_surface *wl_surface,
|
wl_surface_enter(void *data, struct wl_surface *wl_surface,
|
||||||
struct wl_output *wl_output)
|
struct wl_output *wl_output)
|
||||||
{
|
{
|
||||||
|
struct Output *old_output = current_output;
|
||||||
for (int i = 0; i < WL_OUTPUTS_LIMIT; i += 1) {
|
for (int i = 0; i < WL_OUTPUTS_LIMIT; i += 1) {
|
||||||
if (wl_outputs[i].data == wl_output) {
|
if (wl_outputs[i].data == wl_output) {
|
||||||
current_output = &wl_outputs[i];
|
current_output = &wl_outputs[i];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (current_output == old_output) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
keyboard.preferred_scale = current_output->scale;
|
keyboard.preferred_scale = current_output->scale;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user