Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Librem5
squeekboard
Commits
50895d08
Commit
50895d08
authored
Feb 23, 2011
by
Daiki Ueno
Browse files
Avoid to send KeyboardVisibilityChanged on SetKeyboard and SetGroup.
parent
6747e071
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/
system
-client-main.c
→
src/
desktop
-client-main.c
View file @
50895d08
File moved
src/
system
-client.c
→
src/
desktop
-client.c
View file @
50895d08
File moved
src/
system
-client.h
→
src/
desktop
-client.h
View file @
50895d08
File moved
src/server-context.c
View file @
50895d08
...
...
@@ -93,6 +93,7 @@ struct _ServerContext {
gulong
key_pressed_handler
;
gulong
key_released_handler
;
gulong
notify_visible_handler
;
};
struct
_ServerContextClass
{
...
...
@@ -207,8 +208,9 @@ update_widget (ServerContext *context)
context
->
window
=
gtk_window_new
(
GTK_WINDOW_TOPLEVEL
);
g_signal_connect
(
context
->
window
,
"destroy"
,
G_CALLBACK
(
on_destroy
),
context
);
g_signal_connect
(
context
->
window
,
"notify::visible"
,
G_CALLBACK
(
on_notify_visible
),
context
);
context
->
notify_visible_handler
=
g_signal_connect
(
context
->
window
,
"notify::visible"
,
G_CALLBACK
(
on_notify_visible
),
context
);
gtk_container_add
(
GTK_CONTAINER
(
context
->
window
),
context
->
widget
);
gtk_widget_set_can_focus
(
context
->
window
,
FALSE
);
...
...
@@ -471,9 +473,14 @@ handle_method_call (GDBusConnection *connection,
if
(
context
->
window
)
{
gboolean
was_visible
=
gtk_widget_get_visible
(
context
->
window
);
/* avoid to send KeyboardVisibilityChanged */
g_signal_handler_block
(
context
->
window
,
context
->
notify_visible_handler
);
update_widget
(
context
);
if
(
was_visible
)
gtk_widget_show_all
(
context
->
window
);
g_signal_handler_unblock
(
context
->
window
,
context
->
notify_visible_handler
);
}
g_dbus_method_invocation_return_value
(
invocation
,
NULL
);
...
...
@@ -496,9 +503,15 @@ handle_method_call (GDBusConnection *connection,
if
(
context
->
window
)
{
gboolean
was_visible
=
gtk_widget_get_visible
(
context
->
window
);
/* avoid to send KeyboardVisibilityChanged */
g_signal_handler_block
(
context
->
window
,
context
->
notify_visible_handler
);
update_widget
(
context
);
if
(
was_visible
)
gtk_widget_show_all
(
context
->
window
);
g_signal_handler_unblock
(
context
->
window
,
context
->
notify_visible_handler
);
}
g_dbus_method_invocation_return_value
(
invocation
,
NULL
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment