Commit graph

19 commits

Author SHA1 Message Date
Bhushan Shah
6b25335a2b inputmethod: fix coding style
GIT_SILENT
2021-05-11 16:44:01 +05:30
Aleix Pol
64178a0536 textinputv3: activate the input method when textinput says it's enabled 2021-05-11 12:47:27 +02:00
Vlad Zahorodnii
7261bbb230 Fix bad QObject::connect() argument
This fixes the warning that's printed when InputMethod tries to connect
the frameGeometryChanged signal of a null toplevel.
2021-05-09 22:45:27 +00:00
Aleix Pol
4aefbdd175 --warning 2021-05-04 23:07:16 +02:00
Bhushan Shah
d987b94e42 inputmethod: do not deactivate the context when key is pressed
When keyboard_grab is implemented, if we reset the inputmethod context
on any key, input method will not get keyboard input and will not be
able to use it.
2021-05-03 09:44:27 +05:30
Aleix Pol
904c48d563 inputmethod: properly report the text_input_v2 overlap information
Call ::updateInputPanelState when necessary (instead of a trimmed-down
refreshFrame version.
Actually provide the overlap information when it's available, there's no
need to send wrong information there.
2021-04-30 17:46:52 +02:00
Aleix Pol
baa246fbb7 inputmethod: improve the integration of the SNI
* Adds a context menu to choose virtual keyboards.
* Notifies when there is no virtual keyboard selected.
2021-04-29 11:04:19 +00:00
Aleix Pol
050ce24247 inputmethod: Move the input method process into the InputMethod class
Use the control this gives us for stopping the input method process when
we disable.
2021-04-29 11:04:19 +00:00
Bhushan Shah
18af4032e4 inputmethod: update state on new value not cached value
We want to update the inputpanel state on new value which is being set
and not based on the cached value.

Fixes the keyboard going in wrong mode like pre-edit mode when closed
and re-opened.
2021-04-28 03:39:12 +00:00
Vlad Zahorodnii
6fdfd8be5f wayland: Switch to new keyboard event notify methods in SeatInterface 2021-03-26 12:33:12 +02:00
Vlad Zahorodnii
00fcc3a423 wayland: Adjust kwin to SeatInterface changes 2021-03-11 07:36:31 +00:00
Aleix Pol
3953c0c650 inputmethod: Use the object to connect to slots
Otherwise I see the Qt::UniqueConnection not working sometimes making
(at least) commitString happen twice consecutively.
2021-03-10 15:32:51 +01:00
Aleix Pol Gonzalez
05811535d4 Apply 1 suggestion(s) to 1 file(s) 2021-03-06 03:37:51 +00:00
Aleix Pol
92d3cb2f22 inputmethod: If the client hides itself, act accordingly 2021-03-06 03:25:48 +00:00
Aleix Pol
4638f2f309 inputmethod: Refactor VirtualKeyboardDBus to have its own InputMethpd
This way we can have it call methods directly instead of connecting to
its signals.
2021-03-02 13:55:35 +00:00
Aleix Pol
63a7b25801 inputmethod: Provide DBus API so the shell can integrate with it
It makes it possible to show if the virtual keyboard is being shown and
if it is to hide it.
2021-03-02 13:55:35 +00:00
Aleix Pol
d8cb48e6b7 inputmethod: honour SNI disabled state
At the moment we were sending activation signals even if it's disabled.
2021-02-19 13:18:55 +00:00
Bhushan Shah
892b8cf6cb inputmethod: toggle the inputmethod if we get second show request
This is in a way working around bad protocol, input-method-unstable-v1
and also input-method-unstable-v2 does not have a way for input-method
to mark itself as "deactivated". This can happen when e.g. user closes
the virtual keyboard using swiping down or "close keyboard" button in
keyboard.

When this happens, the state between compositor, text_input and
input_method gets out of sync, compositor does not know that input
method got deactivated and hence it will continue sending various events
to it. The quick way around it is to change focus, which makes
compositor send deactivate request to input-method, that puts compositor
and input-method in sync again.

This patch aims to solve this by tracking the last state of input
method, If we know that input method is active and text input sends us
the show event, we toggle the input-method.

I will re-iterate that this is in no way proper solution, ideally
input-method-unstable-v3 or input-method-unstable-v2 even (since it is
not upstream anyway) gains the new request which essentially allows
input-method to sync enabled/disabled state with compositor.
2021-02-18 10:36:39 +05:30
Vlad Zahorodnii
93e0265e4e Move source code to src/ directory
Once in a while, we receive complaints from other fellow KDE developers
about the file organization of kwin. This change addresses some of those
complaints by moving all of source code in a separate directory, src/,
thus making the project structure more traditional. Things such as tests
are kept in their own toplevel directories.

This change may wreak havoc on merge requests that add new files to kwin,
but if a patch modifies an already existing file, git should be smart
enough to figure out that the file has been relocated.

We may potentially split the src/ directory further to make navigating
the source code easier, but hopefully this is good enough already.
2021-02-10 15:31:43 +00:00
Renamed from inputmethod.cpp (Browse further)