mirror of
https://github.com/jjsullivan5196/wvkbd.git
synced 2025-06-04 05:04:23 +02:00
Skip the first resize when landscaped while starting
Signed-off-by: Willow Barraco <contact@willowbarraco.fr> Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
parent
d5db545dcc
commit
7d195c8217
24
main.c
24
main.c
@ -132,6 +132,7 @@ static void layer_surface_configure(void *data,
|
|||||||
static void layer_surface_closed(void *data,
|
static void layer_surface_closed(void *data,
|
||||||
struct zwlr_layer_surface_v1 *surface);
|
struct zwlr_layer_surface_v1 *surface);
|
||||||
static void flip_landscape();
|
static void flip_landscape();
|
||||||
|
static void show();
|
||||||
|
|
||||||
/* event handlers */
|
/* event handlers */
|
||||||
static const struct wl_pointer_listener pointer_listener = {
|
static const struct wl_pointer_listener pointer_listener = {
|
||||||
@ -583,10 +584,25 @@ flip_landscape()
|
|||||||
keyboard.last_abc_layout = keyboard.layout;
|
keyboard.last_abc_layout = keyboard.layout;
|
||||||
keyboard.last_abc_index = 0;
|
keyboard.last_abc_index = 0;
|
||||||
|
|
||||||
if (layer_surface) {
|
if (layer_surface && previous_landscape != keyboard.landscape) {
|
||||||
zwlr_layer_surface_v1_set_size(layer_surface, 0, height);
|
if (popup_xdg_popup) {
|
||||||
zwlr_layer_surface_v1_set_exclusive_zone(layer_surface, height);
|
xdg_popup_destroy(popup_xdg_popup);
|
||||||
wl_surface_commit(draw_surf.surf);
|
popup_xdg_popup = NULL;
|
||||||
|
}
|
||||||
|
if (popup_xdg_surface) {
|
||||||
|
xdg_surface_destroy(popup_xdg_surface);
|
||||||
|
popup_xdg_surface = NULL;
|
||||||
|
}
|
||||||
|
if (popup_draw_surf.surf) {
|
||||||
|
wl_surface_destroy(popup_draw_surf.surf);
|
||||||
|
popup_draw_surf.surf = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
zwlr_layer_surface_v1_destroy(layer_surface);
|
||||||
|
layer_surface = NULL;
|
||||||
|
wl_surface_destroy(draw_surf.surf);
|
||||||
|
|
||||||
|
show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user