Commit Graph

11083 Commits (898e3f625ae53c10577dced0d0a910fd61106541)

Author SHA1 Message Date
Alex Richardson 898e3f625a create a variable and not a function declaration
found with the clang -Wvexing-parse warning
2013-09-13 16:52:25 +02:00
Alex Richardson 109c504ef7 fix mismatched struct/class forward declaration
Found by compiling with clang
2013-09-13 16:52:25 +02:00
Martin Gräßlin e553d2869d Move the decoration window back to the padding position after each resize
Behavior seems to have changed in Qt 5. Without doing the move the deco
has a wrong position and all mouse interaction is broken after the first
resize.

And with this change Oxygen windeco in compositing is fully functional!
2013-09-13 13:56:09 +02:00
Martin Gräßlin 210e1e970b Add override to all methods in KWin::Bridge
Compile errors if we forget to change the Bridge are a nice thing.
2013-09-13 10:39:24 +02:00
Martin Gräßlin e71c921ad2 Add Qt::WindowDoesNotAcceptFocus to our initial window flags on deco
Qt requests focus on a mouse press event on the QWindow of a QWidget.
This results in our active window losing focus when a mouse press on
the window decoration happens.

Of course we don't need Qt to request focus on the window decoration.
If it's the inactive window we will activate it by ourself. If it's
the active window, well it's already active.

Adding Qt::WindowDoesNotAcceptFocus to the initial window flags
ensures that this behavior in Qt gets disables with the result that
the window no longer loses focus on mouse click on decoration.

I declare this to be the most difficult one line change in my life.
2013-09-13 10:13:21 +02:00
Martin Gräßlin eeb095f1e7 Use Qt::WindowFlags also in the bridge
Adjustment to change in KDecorationBridge.
2013-09-13 10:12:28 +02:00
Martin Gräßlin 5eb69aba9c Switch to XCB_BUTTON_INDEX* for Pointer Button constants 2013-09-13 09:12:26 +02:00
Martin Gräßlin 85152773fc Fix wrong enum
Why do they have to sound so similar?
2013-09-13 09:11:10 +02:00
Martin Gräßlin 2944e919da Introduce d-ptr class for KCommonDecoration 2013-09-12 09:27:39 +02:00
Martin Gräßlin 169beb6b1f Add d-ptr class for KCommonDecorationButton
All private members are moved to the new d-ptr class.
2013-09-12 09:27:39 +02:00
Martin Gräßlin fcfcc795e6 Change KDecorationFactory::options()
* no longer inlined
* forwards to KDecorationOptions::self()
* deprecated
* protected
2013-09-12 09:27:39 +02:00
Martin Gräßlin dead386941 Move decorations member to d-ptr class KDecorationFactoryPrivate 2013-09-12 09:27:39 +02:00
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