Commit graph

10 commits

Author SHA1 Message Date
Vlad Zahorodnii
3763e4f84b wayland: Interpret input panel's input shape as the window geometry
maliit creates a fullscreen overlay window which doesn't go along well
with out geometry abstractions. For example, raw frame geometry can't be
used to displace normal windows otherwise they will be pushed offscreen.

Some of the maliit quirks are leaked in the InputMethod class. After
extending the lifetime of the InputPanelV1Window, they can cause
problems.

In order to make code in InputMethod more intuitive and encapsulate
maliit quirks, this change makes InputPanelV1Window interpret the
bounding rectangle of the input shape as the window geometry. This
lets us get rid of the hack in inputGeometry() too.

The size checks in Mode::VirtualKeyboard case have been removed because
they should be irrelevant. When reposition() is called, the wl_surface
is mapped, so its size cannot be 0x0.
2023-03-31 16:59:13 +00:00
Vlad Zahorodnii
08bebd1c4a Drop supported_types parameter in Window::windowType()
It's unused mostly.
2023-03-28 12:08:20 +00:00
Xaver Hugl
7cb4b51d5e inputpanel: ignore requested output
While there's specific hardware where the IM could benefit from requesting to
be shown on a specific output, it effectively never has enough information to
choose a useful output - and the protocol doesn't allow setting a null output
to indicate that the compositor should do the choice.
To avoid showing the OSK on the wrong output, always put it on the active
output and ignore what the IM client requests.
2023-01-23 22:28:41 +00:00
Xaver Hugl
314b5327b6 inputpanelv1window: never hide overlay panels
Hiding them never makes sense, and the protocol specifies that the show
and hide requests are about virtual keyboards, not about overlay planels.
2022-10-24 10:53:57 +00:00
Xaver Hugl
75806ecff5 inputpanelv1window: show window when client maps it after setting the mode
BUG: 460537
2022-10-24 10:53:57 +00:00
Xaver Hugl
b4e9443820 inputpanelv1window: fix showing and hiding
Instead of InputMethod directly calling showClient() on the input panel,
call methods that properly show or hide the panel as needed, with readyForPainting
set appropriately. This removes the cases where it's shown without being ready for
painting, which causes crashes.

BUG: 459404
2022-09-24 20:21:48 +00:00
David Edmundson
7292af3d04 Use floating geometry throughout
With fractional scaling integer based logical geometry may not match
device pixels. Once we have a floating point base we can fix that. This
also is
important for our X11 scale override, with a scale of 2 we could
get logical sizes with halves.

We already have all input being floating point, this doubles down on it
for all remaining geometry.

- Outputs remain integer to ensure that any screen on the right remains
aligned.
 - Placement also remains integer based for now.
- Repainting is untouched as we always expand outwards
 			   (QRectF::toAdjustedRect().
 - Decoration is untouched for now
 - Rules are integer in the config, but floating in the adjusting/API
This should also be fine.

At some point we'll add a method to snap to the device pixel
grid. Effectively `round(value * dpr)  / dpr` though right now things
mostly work.

This also gets rid of a lot of hacks for QRect right and bottom which
are very
confusing.

Parts to watch out in the port are:
 QRectF::contains now includes edges
QRectF::right and bottom are now sane so previous hacks have to be
removed
 QRectF(QPoint, QPoint) behaves differently for the same reason
 QRectF::center too

In test results some adjusted values which are the result of
QRect.center because using QRectF's center should behave the same to the
user.
2022-07-14 10:04:46 +01:00
Vlad Zahorodnii
175037d9d1 Prefer the term "window" over "client" in Workspace 2022-04-25 11:33:55 +00:00
Vlad Zahorodnii
f0f829bc5b Rename WaylandClient to WaylandWindow
The word "client" means different things in wayland and kwin. Use a
better word to refer to windows.
2022-04-23 07:55:51 +00:00
Vlad Zahorodnii
48b951201a Rename InputPanelV1Client to InputPanelV1Window
The word "client" means different things in wayland and kwin. Use a
better word to refer to windows.
2022-04-23 07:55:51 +00:00
Renamed from src/inputpanelv1client.h (Browse further)