Commit Graph

11071 Commits (9aeebb179f3ed99da08762334fcce6096210aeaa)

Author SHA1 Message Date
Martin Gräßlin 9aeebb179f Move static KDecorationOptions* to KDecorationOptions
No idea why it was in KDecoration in the first place, but creation
and deletion is done in KDecorationOptions. So it clearly belongs
there.
2013-09-12 09:27:39 +02:00
Martin Gräßlin f0e8f5ee64 Move factory to d-ptr class KDecorationPrivate 2013-09-12 09:27:39 +02:00
Martin Gräßlin 7c1a7f46d8 Move QWidget* data member to d-ptr class KDecorationPrivate 2013-09-12 09:27:39 +02:00
Martin Gräßlin 0aa9594608 Move bridge into d-ptr class KDecorationPrivate 2013-09-12 09:27:39 +02:00
Martin Gräßlin 014910ffe5 Un-inline methods in k(common)decoration headers
Makes Krazy more happy and allows us to change the implementation.
E.g. the one in KCommonDecoration should use a d-ptr.
2013-09-12 09:27:39 +02:00
Martin Gräßlin 8d4e2a630f Drop no longer needed emitKeepAbove/BelowChanged from KDecoration
Not called from anywhere and marked as remove Qt5.
2013-09-12 09:27:39 +02:00
Martin Gräßlin c5e60a7ce8 Add properties for keepAbove/Below to KDecoration
For consistency two new changed signals are introduced without any
argument and the old signals are marked as deprecated.
2013-09-12 09:27:39 +02:00
Martin Gräßlin 7aadeaa310 Add maximized property and changed signal to KDecoration
Replaces the pure virtual method which the Decoration had to
implement. Instead the Decoration can now connect to the signal.

For KCommonDecoration there is no change at all except that the
invoked method is turned into a slot.

The property is of type bool and maps to isMaximized and not to
maximizeMode.
2013-09-12 09:27:39 +02:00
Martin Gräßlin c918f40a77 Introduce a convenience method isMaximized in KDecoration
Returns true in case of fully maximized, false otherwise. By that
it ignores the horizontal and vertical modes.
2013-09-12 09:27:39 +02:00
Martin Gräßlin 22e4476777 Add icon property and changed signal to KDecoration
Replaces the pure virtual method which the Decoration had to
implement. Instead the Decoration can now connect to the signal.

For KCommonDecoration there is no change at all except that the
invoked method is turned into a slot.
2013-09-12 09:27:39 +02:00
Martin Gräßlin 63bb36e2ad Add shade property and changed signal to KDecoration
Replaces the pure virtual method which the Decoration had to
implement. Instead the Decoration can now connect to the signal.

For KCommonDecoration there is no change at all except that the
invoked method is turned into a slot.
2013-09-12 09:27:39 +02:00
Martin Gräßlin fd64a29f72 Add desktop property and changed signal to KDecoration
Replaces the pure virtual method which the Decoration had to
implement. Instead the Decoration can now connect to the signal.

For KCommonDecoration there is no change at all except that the
invoked method is turned into a slot.

Also isOnAllDesktop property is added using the same changed
signal as desktop property.
2013-09-12 09:27:39 +02:00
Martin Gräßlin 29bce13e9f Add caption property and changed signal to KDecoration
Replaces the pure virtual method which the Decoration had to
implement. Instead the Decoration can now connect to the signal.

For KCommonDecoration there is no change at all except that the
invoked method is turned into a slot
2013-09-12 09:27:39 +02:00
Martin Gräßlin e1c4512ccc Add active property and changed signal to KDecoration
Replaces the pure virtual method which the Decoration had to
implement. Instead the Decoration can now connect to the signal.

For KCommonDecoration there is no change at all except that the
invoked method is turned into a slot.
2013-09-12 09:27:39 +02:00
Martin Gräßlin 70aafe08b5 Drop the KDecorationDefines::Settings* enum
No longer needed as the reset method is gone.
2013-09-12 09:27:38 +02:00
Martin Gräßlin 287ddf8446 Remove reset method from OxygenClient
Connects to the appropriate changed signals instead.
2013-09-12 09:27:38 +02:00
Martin Gräßlin d10a31750e Drop reset method from K(Common)Decoration
For the only remaining update flag a dedicated signal is added to
KDecoration.
2013-09-12 09:27:38 +02:00
Martin Gräßlin 2f2e17ac19 Drop reset from AuroraeClient
Was only delegating to parent class thus not doing anything.
2013-09-12 09:27:38 +02:00
Martin Gräßlin 0ba75ca07f Drop the reset methods in KDecorationFactory
They are no longer used by any decoration or by KWin core.
2013-09-12 09:27:38 +02:00
Martin Gräßlin d29b9bf03a Introduce a compositingChanged signal in KDecorationOptions
Connected from a signal in DecorationPlugins in KWin core replacing
the previous reset method.
2013-09-12 09:27:38 +02:00
Martin Gräßlin 69be5b3e25 Oxygen connects to the new KDecorationOptions signals
At least to those it is interested in.
2013-09-12 09:27:38 +02:00
Martin Gräßlin 9797fe2122 Aurorae connects to new changed signals by KDecorationOptions
No longer implements the reset() method by KDecorationFactory.
2013-09-12 09:27:38 +02:00
Martin Gräßlin d403bfcadb Make KDecorationOptions::updateSettings protected
Only called from KWin::Options, so no need to have it public.
2013-09-12 09:27:38 +02:00
Martin Gräßlin ad85c6bc99 Introduce changed signals in KDecorationOptions
For this KDecorationOptions becomes a QObject. The changed flags from
updateSettings are removed. Instead the method just emits the proper
changed signals.

This should allow better handling in the Factories.
2013-09-12 09:27:38 +02:00
Martin Gräßlin e923426930 Add a recreateDecorations signal to KDecorationFactory
A factory is supposed to emit this signal whenever the decorations
need to be recrated. The DecorationPlugins inside KWin Core connect
to the signal and recreate the decorations.

This signal is supposed to replace the reset method which encoded
this information in the return value and which is already ignored.
2013-09-12 09:27:38 +02:00
Martin Gräßlin e2583e679f No longer pass changed mask from KWin core to the decorations
The changed mask is going to be replaced by more specific signals so
we don't need to calculate the change mask in KWin core anymore.

We still need to call reset in the decoration plugin to check whether
a new decoration library needs to be loaded.
2013-09-12 09:27:38 +02:00
Martin Gräßlin c2fdc66cee Remove pure virtual updateSettings from DecorationOptions
Not really needed as it's only invoked from inside KWin core to the
Options class.
2013-09-12 09:27:38 +02:00
Martin Gräßlin ae50ef270b Make KDecorationFactory ctor protected
It's not supposed to be invoked directly, but always through a
subclass.
2013-09-12 09:27:38 +02:00
Martin Gräßlin 784c40a338 KDecorationFactory inherits from QObject
Adjusting to reality: our decorations have the factory already inheriting
from QObject.
2013-09-12 09:27:38 +02:00
Martin Gräßlin 10e044151e Drop KDecorationFactoryUnstable
Did nothing and no longer needed.
2013-09-12 09:27:38 +02:00
Martin Gräßlin a90072d753 Merge KDecorationUnstable into KDecoration
Also KCommonDecorationUnstable is merged into KCommonDecoration.
2013-09-12 09:27:38 +02:00
Martin Gräßlin afcf6dbc41 Remove deprecated functionality from libkdecorations 2013-09-12 09:27:37 +02:00
Martin Gräßlin c8331784ba Merge KDecorationBridgeUnstable into KDecorationBridge 2013-09-12 09:27:37 +02:00
Sebastian Kügler a1641efdf1 Remove kdeqt5staging
Reviewed-by: Martin
2013-09-11 13:57:41 +02:00
Martin Gräßlin 75fe5f6965 Port Client::firstInTabBox to XCB
That code needs testing with Plasma Active.
2013-09-11 08:39:17 +02:00
Martin Gräßlin 5cf871d827 Port readWindowProperty in effects.cpp to XCB 2013-09-11 08:38:10 +02:00
Martin Gräßlin 634a84e5c0 Port reading the shadow property to XCB 2013-09-11 08:21:44 +02:00
Martin Gräßlin c754ba7f8d Use Xcb::Atom for resolving the highlight windows atom in TabBox
Nice side-effect: it will only be fetched once and not every time
highlight is invoked or ended.
2013-09-10 15:30:11 +02:00
Martin Gräßlin 108252194a Use Xcb::Atom in KWin::Atoms to resolve all atoms
During startup we only create the request, the reply will be fetched
once the atom is needed.

To make proper use of this async behavior the creation of Atoms is
moved directly to the claim of the manager selection, so they can be
fetched while we wait for the previous manager selection to give up
on it.
2013-09-10 15:30:11 +02:00
Martin Gräßlin c29a622be1 Introduce a wrapper class for InternAtom
Not extending Xcb::Wrapper as it does not operate on a window.
Instead it is a specified class for the specific usecase.
2013-09-10 15:30:11 +02:00
Martin Gräßlin 64dde54f35 Perform crash count checking before we claimed the manager selection
The crash count checking does not depend on whether or not we will
be able to claim the window manager selection. As claiming the selection
can take up to one second we should try to get as many checks which do
not depend on it out.
2013-09-10 15:30:11 +02:00
Martin Gräßlin 5d6c52e26c Drop initing variable from kwin/main.cpp
It's nowhere read, just set once to true and once to false and by
that rather useless.
2013-09-10 15:30:11 +02:00
Martin Gräßlin 439122e2bc Use Xcb::CurrentInput in the focus in event handler 2013-09-10 15:30:11 +02:00
Martin Gräßlin 4576a0b6db Port last UngrabPointer to XCB 2013-09-10 15:30:11 +02:00
Martin Gräßlin 1121b2abb0 Port setting kwin_running atom to XCB 2013-09-10 15:30:11 +02:00
Martin Gräßlin e687c91402 Add a changeProperty method to Xcb::Window
Used from Client to directly change properties on its client.
2013-09-10 15:30:11 +02:00
Martin Gräßlin 85ea66f736 Port remainind XSync calls to XCB variant 2013-09-10 15:30:11 +02:00
Martin Gräßlin 4173de1164 Port remaining set input focus to XCB 2013-09-10 15:30:11 +02:00
Martin Gräßlin 77edf8eb69 Port all XAllowEvents to xcb_allow_events in kwin 2013-09-10 15:30:11 +02:00
Martin Gräßlin 1fd857eecb And add the grabButton() to Xcb::Window
Again most of the arguments have a default value to ease the usage
inside KWin and remove the horrific long methods.
2013-09-10 15:30:10 +02:00