layout_state: Don't always operate on the global instance
This commit is contained in:
@ -124,9 +124,10 @@ eek_gtk_keyboard_real_size_allocate (GtkWidget *self,
|
|||||||
(uint32_t)(allocation->width - allocation->x) * scale,
|
(uint32_t)(allocation->width - allocation->x) * scale,
|
||||||
(uint32_t)(allocation->height - allocation->y) * scale);
|
(uint32_t)(allocation->height - allocation->y) * scale);
|
||||||
if (priv->layout->arrangement != new_type) {
|
if (priv->layout->arrangement != new_type) {
|
||||||
priv->layout->arrangement = new_type;
|
struct squeek_layout_state layout = *priv->layout;
|
||||||
|
layout.arrangement = new_type;
|
||||||
|
|
||||||
eek_layout_holder_use_layout(priv->eekboard_context, priv->layout);
|
eek_layout_holder_use_layout(priv->eekboard_context, &layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->renderer)
|
if (priv->renderer)
|
||||||
|
|||||||
@ -99,6 +99,7 @@ settings_get_layout(GSettings *settings, char **type, char **layout)
|
|||||||
|
|
||||||
void
|
void
|
||||||
eek_layout_holder_use_layout(LayoutHolder *context, struct squeek_layout_state *state) {
|
eek_layout_holder_use_layout(LayoutHolder *context, struct squeek_layout_state *state) {
|
||||||
|
*context->layout = *state;
|
||||||
gchar *layout_name = state->overlay_name;
|
gchar *layout_name = state->overlay_name;
|
||||||
|
|
||||||
if (layout_name == NULL) {
|
if (layout_name == NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user