Commit 47a483da authored by Alexander Mikhaylenko's avatar Alexander Mikhaylenko
Browse files

Merge branch 'idle' into 'master'

visibility: Stop calling GTK functions from the visibility manager

See merge request !425
parents 6e7c0e6f 0c179560
Pipeline #62978 passed with stages
in 21 minutes and 57 seconds
...@@ -239,6 +239,13 @@ server_context_service_real_show_keyboard (ServerContextService *self) ...@@ -239,6 +239,13 @@ server_context_service_real_show_keyboard (ServerContextService *self)
gtk_widget_show (GTK_WIDGET(self->window)); gtk_widget_show (GTK_WIDGET(self->window));
} }
static gboolean
show_keyboard_source_func(ServerContextService *context)
{
server_context_service_real_show_keyboard(context);
return G_SOURCE_REMOVE;
}
static void static void
server_context_service_real_hide_keyboard (ServerContextService *self) server_context_service_real_hide_keyboard (ServerContextService *self)
{ {
...@@ -246,6 +253,13 @@ server_context_service_real_hide_keyboard (ServerContextService *self) ...@@ -246,6 +253,13 @@ server_context_service_real_hide_keyboard (ServerContextService *self)
self->visible = FALSE; self->visible = FALSE;
} }
static gboolean
hide_keyboard_source_func(ServerContextService *context)
{
server_context_service_real_hide_keyboard(context);
return G_SOURCE_REMOVE;
}
static gboolean static gboolean
on_hide (ServerContextService *self) on_hide (ServerContextService *self)
{ {
...@@ -266,7 +280,7 @@ server_context_service_show_keyboard (ServerContextService *self) ...@@ -266,7 +280,7 @@ server_context_service_show_keyboard (ServerContextService *self)
} }
if (!self->visible) { if (!self->visible) {
server_context_service_real_show_keyboard (self); g_idle_add((GSourceFunc)show_keyboard_source_func, self);
} }
} }
...@@ -289,7 +303,7 @@ server_context_service_hide_keyboard (ServerContextService *self) ...@@ -289,7 +303,7 @@ server_context_service_hide_keyboard (ServerContextService *self)
g_return_if_fail (SERVER_IS_CONTEXT_SERVICE(self)); g_return_if_fail (SERVER_IS_CONTEXT_SERVICE(self));
if (self->visible) { if (self->visible) {
server_context_service_real_hide_keyboard (self); g_idle_add((GSourceFunc)hide_keyboard_source_func, self);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment