Hi everybody!
I am keeping trying to know what could be wrong with my code. Now I have a "workaround" for the issue but with an inconvenient: I loose the first widget clicked in the Virtual Keyboard.
After further investigations I realize that , after to open Virtual Keyboard, a widget of it (in my case, OK button) has the focus. When I click on any widget, the focus comes back to GtkTextView in another page of GtkNotebook (should it be a bug?) then I have no more control on any widget in Virtual Keyboard. When I press ALT+TAB, the GtkTextView loose its focus. When I press ALT+TAB again and return to my application, GtkTextView grab focus again but, this time, if I click on any widget of Virtual Keyboard, GtkTextView lose the focus and the clicked widget get it. After to confirm this behaviour I changed my code to transfer the focus to Virtual Keyboard if GtkTextView grab the focus and Virtual Keyboard page is selected.
Follow my workaround just for reference:
Code:
gboolean cbFocusIn(GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
GtkNotebook *ntb = GTK_NOTEBOOK(gtk_builder_get_object(builder, "ntbWorkArea"));
if(gtk_notebook_get_current_page(ntb)) {
gtk_notebook_set_current_page(ntb, 0);
} else {
gtk_widget_grab_focus(GTK_WIDGET(gtk_builder_get_object(builder, "txvVirtualKeyboard")));
}
return FALSE;
}