Commit Graph

13884 Commits (ee7f70afc8880e42136db75d998679f7870f5b8c)

Author SHA1 Message Date
Martin Graesslin d2cb445f4c Delay enabling vsync till first frame is rendered
According to the hwcomposer documentation:
"It is a (silent) error to have HWC_EVENT_VSYNC enabled when calling
hwc_composer_device.set(..., 0, 0, 0) (screen off)".

Because of that we may not enable vsync directly after toggling the
output, but need to wait till after calling the set call.

Reviewed-by: Bhushan Shah
2015-10-19 10:18:48 +02:00
l10n daemon script b20ccf91c6 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-10-18 11:06:54 +00:00
Martin Gräßlin 70e744fe26 [backends/hwcomposer] Add a failsafe timer for vsync events
Apparently we don't get a vsync event for the first frame during startup
which blocks the compositor till the end of days. Thus a timer is added
which calls vsync after 1 sec if we didn't get an event.
2015-10-16 18:19:10 +02:00
Thomas Lübking 801e60b290 force grab on useractions menu
Workaround, this *seems* a Qt problem.
The grab fails while the button is down - Qt then also seems
to release the keyboard.

Not sending it to the deco didn't help either - nevertheless it seems
(from the Qt code) as if the button is currently grabbed
(the code is a dumb forward to xcb_grab_pointer)

As a workaround, the patch simply ensures a grab on releasing a button when
the popup is visible.

BUG: 351112
FIXED-IN: 5.5
2015-10-16 15:45:55 +02:00
Martin Gräßlin 226c9a0367 Call checkWorkspacePosition also for Wayland clients in ::updateClientArea 2015-10-16 08:34:25 +02:00
Martin Gräßlin 8cdfb0e88f Merge back implementation of Client::move and ShellClient::move
Implementation goes to AbstractClient, method is no longer virtual.
The X11 specific code is moved to a new virtual protected doMove
method implemented in Client.
2015-10-15 15:29:09 +02:00
Martin Gräßlin c578720615 Add virtual AbstractClient::updateTabGroupStates(TabGroup::States)
Method added so that we can call into TabGroup::updateStates from code
in AbstractClient. Default implementation does nothing, implementation
in Client performs the actuall call.

As a first case added to Client::move in order to be able to move the
implementation to AbstractClient.
2015-10-15 15:29:09 +02:00
Martin Gräßlin d7b4d8fe82 Move functionality for geom_before_block to AbstractClient
Semantically it belongs together with geometry update blocking which
is already in AbstractClient.
2015-10-15 15:29:09 +02:00
Martin Gräßlin a186e407bf Move handling around deco_rect_before_block to AbstractClient
The usage was always to trigger repaints on the old and the new
visibleRect. And store the new visibleRect as the future old one.

This is now encapsulated in a dedicated method called
addRepaintDuringGeometryUpdates().
2015-10-15 15:29:09 +02:00
l10n daemon script 0c159e0106 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-10-15 11:59:46 +00:00
Martin Gräßlin f36af69a0e [hwcomposer] Add support for vsync
Note: qt5-qpa-hwcomposer-plugin does the vsync in a different way:
it uses a wait condition to truly block in present till the vsync.
Maybe we need to do that as well.
2015-10-15 09:17:57 +02:00
Martin Gräßlin 03074c925c Use AbstractClient where possible in EffectsHandlerImpl
That magically makes things working like moving windows in desktop grid
to another desktop.
2015-10-14 17:35:10 +02:00
Martin Gräßlin a2b83bffc5 [wayland] Update geometry in ShellClient::setGeometry directly if size didn't change
If the size is the same it's basically just a window movement. That's
nothing we need to roundtrip to the client, but can adjust the geometry
change directly.

The quick tiling test is adjusted to test this together with
sendToScreen. Each window is also sent to the next screen to verify the
state doesn't change and geometry is updated.

Note: the flag for quick maximization seems to get lost in this setup.
2015-10-14 16:38:17 +02:00
Martin Gräßlin 5558d62220 [backends/virtual] Add possibility to have multiple virtual screens
Very basic: all screens have same size and are ordered from left to
right. It's mostly meant to allow easy test cases with multi-screen.

The quick tiling test demonstrates how it's used.
2015-10-14 16:38:17 +02:00
Martin Gräßlin 6049b9ff3c Move implementation of sendToScreen from Client to AbstractClient
Method is no longer virtual, stub in ShellClient removed.
2015-10-14 16:38:17 +02:00
David Edmundson 0e1e85d81c Fix unit test
Last commit removed a setGeometry call that I thought was only used to clear an edge (which we don't want) but was in fact crucial to the next test.

REVIEW: 125635
2015-10-14 13:56:30 +01:00
Martin Gräßlin 66e27b69bb [backends/hwcomposer] Drop dependency on hybrissync library
No longer used and not needed.
2015-10-14 14:33:49 +02:00
l10n daemon script db3ac9a536 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-10-14 10:26:47 +00:00
Martin Gräßlin 86448c66dd [wayland] Use first valid geometry of ShellClient as restore geometry
This is needed to properly restore to a valid geometry after quick
maximizing. Note: this is not yet perfect, actually it should be done
after initial placing, which means we do need a manage method like
Client.

The autotest for quick tiling is extended to cover maximize changes
and cover this case.
2015-10-14 12:11:56 +02:00
Martin Gräßlin 996c828da3 [autotest/wayland] Add a test for quick tiling Wayland clients
Base test verifies the quick tile positions. No maximization or direct
state changes tested yet.

Required to have Toplevel and AbstractClient exported. Otherwise we
cannot use the SignalSpy.
2015-10-14 09:58:16 +02:00
Martin Gräßlin 41af9c400c [wayland] Allow resizing on ShellClients
Needed to be able to put clients into quick tile mode.
2015-10-14 08:36:29 +02:00
Martin Gräßlin 9f91431e8c Move quick tiling from Client to AbstractClient
In order to make it possible to quick tile also ShellClients.
2015-10-14 08:36:29 +02:00
Martin Gräßlin 9f2b4c7d14 Introduce a virtual AbstractClient::updateQuickTileMode(QuickTileMode)
New method is used to modify the quick tile mode state directly.
Preparation step for moving the quick tile handling to AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin fa18d60e9e Use quickTileMode() instead of quick_tile_mode
Preparation step to have quick tile handled inside AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin 61caf788e3 Use (set)GeometryRestore() instead of geom_restore in Client::setQuickTileMode
Preparation step to move the implementation to AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin 15f5886426 Add a pure virtual AbstractClient::setGeometryRestore(const QRect &) 2015-10-14 08:36:29 +02:00
Martin Gräßlin 94b5ca0d2b TabSynchronizer operates on AbstractClient
Change required to get methods using TabSynchronizer moved to
AbstractClient. Unfortunately we need to cast to Client when calling
updateStates. It's save as if it's not a Client we
a) don't have a tabGroup in the first place
b) the check if (main == only) will hit and the method returns
2015-10-14 08:36:29 +02:00
Martin Gräßlin 9ef42ae3c7 Move blocking geometry updates functionality to AbstractClient 2015-10-14 08:36:29 +02:00
Martin Gräßlin 646eeb8bbb Provide isDecorated() as virtual method on AbstractClient
Default implementation returns false.
2015-10-14 08:36:29 +02:00
Martin Gräßlin 727929db8a Use isDecorated() instead of m_decoration in Client::setQuickTileMode
A preparation step to move the implementation to AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin ec6c778df7 Move implementation of checkWorkspacePosition to AbstractClient
No longer a virtual method, the implementation of Client is turned into
AbstractClient. The stub removed from ShellClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin 696cdb9e39 Add setGeometry to AbstractClient as pure virtual method
In Client existing method is marked as override, in ShellClient a new
override is added which delegates to requestGeometry. Existing method
is renamed to doSetGeometry and all internal calls delegat to it.
Needs better merging with the implementation of Client.
2015-10-14 08:36:29 +02:00
Martin Gräßlin eacaf25acf Improve sharing of maximize between Client and ShellClient
The changeMaximize method is added as a pure virtual protected method
to AbstractClient. This replaces the previous pure virtual maximize
method. Which is now directly implemented in AbstractClient (reusing
the implementation previously in Client).
2015-10-14 08:36:29 +02:00
Martin Gräßlin 60342d44e3 Move adjustedSize from Client to AbstractClient 2015-10-14 08:36:29 +02:00
Martin Gräßlin 7c49b1ca42 Add sizeForClientSize as virtual method to AbstractClient
Base implementation returns the passed in size.

Required for moving adjustedSize to AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin 37fc20d3c0 Move enum Sizemode from Client to AbstractClient
Required to add e.g. sizeForClientSize and adjustedSize to
AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin acb3a14200 Add border(Left|Top|Right|Bottom)() const as virtual methods in AbstractClient
At some future point we will also need it in ShellClient and it allows us
to better share geometry related implementations.

Base implementation returns 0, that is no border.
2015-10-14 08:36:29 +02:00
Martin Gräßlin e121d4a107 Use quickTileMode() instead of quick_tile_mode in Client::checkWorkspacePosition
Preparation step for moving implementation of checkWorkspacePosition
to AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin ee47ce613d Provide quickTileMode() as virtual method in AbstractClient
Base implementation always returns QuickTileNone. Implementation in
Client overrides. Long term solution: provide functionality directly
in AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin d1baa4d283 Use geometryRestore() instead of geom_restory in Client::checkWorkspacePosition
Preparation for moving the implementation to AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Graesslin 28fe78a94f Adjust to newer upstream libhybris version
Based on a previous patch done by David Edmundson and heavily
inspired by qt5-qpa-hwcomposer-plugin [1].

The change requires a newer libhybris than the one used by Ubuntu. In
fact it allows to build against current master (at the day of writing [2]).

REVIEW: 125606

[1] https://github.com/mer-hybris/qt5-qpa-hwcomposer-plugin
[2] bd6df6a306
2015-10-14 08:14:24 +02:00
Martin Graesslin 425e703dff Drop Android input handling
Libinput does work on libhybris enabled devices. There is no need to
use Android's input stack. This simplifies our code a lot and increases
sharing with normal Linux systems.

What's tricky is to convince the system to use libinput through with our
logind helper. Logind fails to open the files for us if we start KWin
over either ssh or adb shell. We need to get it into a proper session, so
only a kwin started through a helper like simplelogin will be able to use
libinput.

REVIEW: 125608
2015-10-14 08:13:37 +02:00
l10n daemon script f4069deb5c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-10-13 12:48:07 +00:00
David Edmundson 04ab8554aa Add hint similar to autohide to raise/lower a window
Add action type to screen edge show to allow raise/lower as well as
autohide

Add an action type to screen edge show to allow raise/lower as well as
autohide. This uses the same atom, using a mask to separate type and
location.

The logic for handling geometry changes is moved from the screenedge to
the client so that we can handle both types without screenedge needing
to know what the raise is for.

REVIEW: 124272
2015-10-12 10:37:16 +01:00
Martin Gräßlin 78e9a56cd1 Move checkOffscreenPosition from Client to AbstractClient 2015-10-12 10:50:20 +02:00
Martin Gräßlin 53b87dbbd9 Move (is|set)ElectricBorderMaximizing from Client to AbstractClient 2015-10-12 10:26:00 +02:00
Martin Gräßlin 226a099366 Move electricBorderMaximizeGeometry from Client to AbstractClient
As it's not used outside of Client the method is turned from public
to protected.
2015-10-12 10:24:49 +02:00
Martin Gräßlin 32fbbc90bc Make geometryRestore() pure virtual in AbstractClient
Provides an implementation in ShellClient and method in Client gets
marked as override.
2015-10-12 10:23:06 +02:00
Martin Gräßlin 9b8836b455 Move (set)electricBorderMode() from Client to AbstractClient
While it was public in Client, it was not used anywhere outside of
Client, because of that it's only protected in AbstractClient.
2015-10-12 09:56:54 +02:00
Martin Gräßlin b489ebabdc Move signal quickTileModeChanged from Client to AbstractClient 2015-10-12 09:38:42 +02:00