Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dorota Czaplejewicz
squeekboard
Commits
2f7aa77c
Commit
2f7aa77c
authored
Mar 08, 2011
by
Daiki Ueno
Browse files
Fix focus listener logic.
parent
bed39570
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/desktop-client.c
View file @
2f7aa77c
...
...
@@ -68,6 +68,7 @@ struct _EekboardDesktopClient {
gulong
key_released_handler
;
#ifdef HAVE_CSPI
Accessible
*
acc
;
AccessibleEventListener
*
focus_listener
;
AccessibleEventListener
*
keystroke_listener
;
#endif
/* HAVE_CSPI */
...
...
@@ -433,10 +434,24 @@ focus_listener_cb (const AccessibleEvent *event,
case
SPI_ROLE_PARAGRAPH
:
case
SPI_ROLE_PASSWORD_TEXT
:
case
SPI_ROLE_TERMINAL
:
if
(
strncmp
(
event
->
type
,
"focus"
,
5
)
==
0
||
event
->
detail1
==
1
)
{
client
->
acc
=
accessible
;
eekboard_context_show_keyboard
(
client
->
context
,
NULL
);
}
else
if
(
event
->
detail1
==
0
&&
accessible
==
client
->
acc
)
{
client
->
acc
=
NULL
;
eekboard_context_hide_keyboard
(
client
->
context
,
NULL
);
}
break
;
case
SPI_ROLE_ENTRY
:
if
(
g_strcmp0
(
event
->
type
,
"focus"
)
==
0
||
event
->
detail1
==
1
)
{
if
(
strncmp
(
event
->
type
,
"focus"
,
5
)
==
0
||
event
->
detail1
==
1
)
{
client
->
acc
=
accessible
;
eekboard_context_show_keyboard
(
client
->
context
,
NULL
);
}
else
if
(
event
->
detail1
==
0
)
{
client
->
acc
=
NULL
;
eekboard_context_hide_keyboard
(
client
->
context
,
NULL
);
}
break
;
default:
;
}
...
...
Write
Preview
Markdown
is supported
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