Commit Graph

248 Commits (6d0d9cfe43cca99990d99c6f93fd5dc96cbc9cef)

Author SHA1 Message Date
Thomas Lübking 8cf6e39eab general tabbox support for screenedges
REVIEW: 109362
BUG: 316288
FIXED-IN: 4.11
2013-04-16 22:07:07 +02:00
Thomas Lübking c6ff7932c2 Tabbox: ask kwin about compositing
REVIEW: 109983
2013-04-16 22:07:06 +02:00
Martin Gräßlin edb074cbc2 Split out screen handling from Workspace into own class Screens
Following the approaches of other split out functionality Screens is a
singleton class created by Workspace.

The class takes over the responsibility for:
* screenChanged signal delayed by timer
* number of screens
* geometry of given screen
* active screen
* config option for active screen follows mouse

The class contains a small abstraction layer and has a concrete subclass
wrapping around QDesktopWidget, but the idea is to go more low level and
interact with XRandR directly to get more detailed information.

All over KWin the usage from QDesktopWidget is ported over to the new
Screens class.

REVIEW: 109839
2013-04-15 10:25:10 +02:00
Martin Gräßlin d503d9ffb6 Turn TabBox into a proper singleton
There is only one instance hold by Workspace which means it should follow
the common approach with ::self and ::create.

The hasTabBox is completely removed as it's rather useless and the same
as the ifdef around the usages any way.

REVIEW: 109851
2013-04-11 14:18:30 +02:00
Martin Gräßlin da85b5fdc7 Split out Activities related code from Workspace
All activities related code moves into new singleton class Activities.
This class gets only included into the build if the build option is
enabled which means there are less ifdefs all over the code and it also
handles better the moc doesn't like ifdef case.

The class holds the list of open and all activites, the current and the
previous activity and the KActivities::Controller. It also emits the
signals for any activities related changes.

Workspace still contains some activities related code. That is the
adjustment on change of current activity. Nevertheless the code looks
much cleaner now and does not contain the confusing naming conflict with
takeActivity() which existed before.

In all the places where Activities got used the code got adjusted and
quite often the ifdef got added with a fallback for the disabled case.
2013-04-11 13:01:36 +02:00
Thomas Lübking 2935919cd8 TabBox: fix plasma theme workaround (tabbox)
BUG: 315064
FIXED-IN: 4.10.3
REVIEW: 108947
2013-04-09 19:00:41 +02:00
Script Kiddy 285cdce324 SVN_SILENT made messages (.desktop file) 2013-03-24 08:31:57 +01:00
Martin Gräßlin 98a04893a6 Use mgraesslin@kde.org for my mail address in Copyright and AboutData 2013-03-12 13:17:53 +01:00
Martin Gräßlin 6424a44632 Add some missing includes with Qt5/KF5 2013-03-07 13:59:16 +01:00
Martin Gräßlin 5755a6f21a Include KIcon where needed
Similar to the KGlobal case: no longer included in other includes.
2013-03-07 13:59:16 +01:00
Martin Gräßlin 0ccc060218 Include KGlobal were needed
With KF5 some includes which used to include KGlobal, e.g. KStandardDirs
do no longer include KGlobal. So if we use KGlobal we should include it.
2013-03-07 13:59:15 +01:00
Martin Gräßlin 60c42b7a34 s/KLocale/KLocalizedString/g
Many headers included KLocale to use i18n and co. But those methods are
defined in KLocalizedString and not in KLocale.

With KF5 klocale.h does no longer include KLocalizedString causing lots
of compile errors.
2013-03-07 13:59:15 +01:00
Martin Gräßlin 32b6ef42b9 Strip module path from all Qt #include <>
Done with:
fixqt4headers.pl --strip-modules

REVIEW: 109176
2013-03-06 10:26:56 +01:00
Martin Gräßlin 2547192d95 Fix some errors found by ModelTest 2013-02-25 13:40:11 +01:00
Martin Gräßlin 54b263e7b6 Add icons of selected desktop to Desktop TabBox
To support this feature the DesktopModel is turned into a tree model with
the desktops on the root level and the Client's at the next level.

In the view a VisualDataModel is used which kind of supports a tree model
by setting the root index. A list view is added underneath all the
desktops showing the icons of the windows on the desktop one switches to.

BUG: 306187
FIXED-IN: 4.11
REVIEW: 108445
2013-02-25 13:39:57 +01:00
Martin Gräßlin 4a0a4bc27e Split out handling of focus chain into an own class
The new class FocusChain manages two different kind of focus chains.
First of all there is a most recently used focus chain which is primarily
used for TabBox.

Then there is one focus chain per virtual desktop. These chains are used
to determine which Client needs to be activated when e.g. switching to a
virtual desktop.

The individual chains are implemented as a simple QList of Client* with
the most recently used Client as the last element. That way one can see
it as a LIFO like structure.

The desktop focus chains are internally represented as a hash with the id
of the virtual desktop as the key and a list as described as the value.

FocusChain is a singleton which provides some methods to manipulate the
chains and to get a specific Client for a task (e.g. TabBox).

While splitting out the code some unused code inside TabBox got removed
as well as some activities related code (windows cannot be moved while
switching activities).

REVIEW: 107494
2013-02-21 09:57:46 +01:00
Thomas Lübking 48128f268c improve multihead situation
prevents the focus being passed to the other head
manages OpenGLIsUnsafe setting per head

CCBUG: 256242
BUG: 282677
REVIEW: 107853
FIXED-IN: 4.11
2013-02-18 21:55:13 +01:00
Luca Beltrame 2209b4851a Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts [scripty translations]:
	plasma/generic/applets/batterymonitor/metadata.desktop
	plasma/generic/applets/lock_logout/metadata.desktop
2013-02-15 00:04:53 +01:00
Weng Xuetian ae7474a6c4 fix some typo in tabbox qml
REVIEW: 108809
2013-02-14 15:38:50 -05:00
Weng Xuetian b2ee6769de fix Qt 4.7 warning for KWin tabbox qml
improt Qt 4.7 is depracted by import QtQuick 1.0

REVIEW: 108966
2013-02-14 15:35:32 -05:00
Script Kiddy 3e0c94262c SVN_SILENT made messages (.desktop file) 2013-02-06 12:59:02 +01:00
Script Kiddy dad894d830 SVN_SILENT made messages (.desktop file) 2013-02-06 08:18:00 +01:00
Martin Gräßlin 9f85f7f597 Port non-composited Outline to XCB
Use xcb to create and manage the X11 backend of Outline. In addition the
used background pixmaps are rendered with XRender instead of using a
QPainter on a QPixmap. This is done because QPixmap is no longer bound to
an X Pixmap.

To create the XRender Picture the available functionality from
kwinxrenderutils is used. To be able to use it in KWin core the compile
option to build without XRender is removed for kwinxrenderutils, but
still supported for effects.

Obviously the port to XCB is not complete as xremderutils itself is still
on XLib.

REVIEW: 108642
2013-02-04 08:55:21 +01:00
Marco Martin baf21f6b34 Merge branch 'KDE/4.10'
Conflicts:
	plasma/generic/applets/batterymonitor/metadata.desktop
	plasma/generic/applets/lock_logout/metadata.desktop
2013-01-31 17:00:02 +01:00
Script Kiddy f193c56957 SVN_SILENT made messages (.desktop file) 2013-01-31 16:31:28 +01:00
Script Kiddy ca2cf4d697 SVN_SILENT made messages (.desktop file) 2013-01-31 12:00:36 +01:00
Script Kiddy 1416c8d62c SVN_SILENT made messages (.desktop file) 2013-01-30 16:27:26 +01:00
Martin Gräßlin 58019b9ce3 Merge branch 'KDE/4.10'
Conflicts:
	kwin/client.cpp
2013-01-30 15:16:56 +01:00
Martin Gräßlin 0c92e1f30c Use translucent/dialogs/background elements where possible
In effects it's obvious that compositing is enabled, so specifying the
translucent element is no problem.

In tabbox a context property "compositing" is injected which decides
whether "translucent" or "opaque" elements should be used. Here the
translucent elements are only used if the Blur effect is available - for
this a new Effect::Feature Blur is introduced and in addition it is
tested whether the theme provides the translucent element.

Also the masking is adjusted to ensure that only the shadow is not
blurred.

Reason for this change is that Plasma theme seems not always to pick up
whether compositing is used when used from inside KWin. It does not cover
the Desktop Change OSD which uses PlasmaCore.Dialog and there we cannot
(yet) inject that we use compositing.

Overall I'm quite unhappy with this patch and I do hope we can fix it in
the proper place in the lifetime of 4.10 and revert this patch.

CCBUG: 311995
REVIEW: 108438
2013-01-30 15:14:54 +01:00
Script Kiddy f3ca3e4c02 SVN_SILENT made messages (.desktop file) 2013-01-28 08:47:50 +01:00
Script Kiddy da9c66760a SVN_SILENT made messages (.desktop file) 2013-01-27 13:02:17 +01:00
Martin Gräßlin 45af15b459 Merge branch 'KDE/4.10' 2013-01-27 12:13:51 +01:00
Martin Gräßlin b5dd9d93c1 Fix typo in Window Switcher "compact"
BUG: 313950
FIXED-IN: 4.10.0
2013-01-27 12:12:20 +01:00
Script Kiddy 2ea65eb18e SVN_SILENT made messages (.desktop file) 2013-01-26 13:21:28 +01:00
Script Kiddy 7d821f3814 SVN_SILENT made messages (.desktop file) 2013-01-26 09:04:17 +01:00
Script Kiddy d9a7b6023d SVN_SILENT made messages (.desktop file) 2013-01-23 13:10:44 +01:00
Script Kiddy 9b508d15e4 SVN_SILENT made messages (.desktop file) 2013-01-23 08:28:11 +01:00
Script Kiddy 382c2a309b SVN_SILENT made messages (.desktop file) 2013-01-22 20:36:49 +01:00
Script Kiddy 7245237062 SVN_SILENT made messages (.desktop file) 2013-01-22 16:17:03 +01:00
Script Kiddy 589ed300d1 SVN_SILENT made messages (.desktop file) 2013-01-17 12:53:52 +01:00
Script Kiddy 8154d50dec SVN_SILENT made messages (.desktop file) 2013-01-17 08:15:16 +01:00
Weng Xuetian d24ed172cb Merge remote-tracking branch 'origin/KDE/4.10' 2013-01-10 03:04:28 -05:00
Weng Xuetian e17303af99 forgot to add new file. 2013-01-10 03:02:39 -05:00
Weng Xuetian 5b7a30aeac use qml and svg to drag shadow in tabbox
due to plasma change, shadow is not included by default, hence kwin
tabbox need to handle shadow by itself, and due to kwin is compositor
and have shadow as effects, it's not a good idea to use X property to
pass shadow from kwin to X and to kwin. This change use the old way to
draw shadow side the tabbox, and partly move the blur region setting to
qml.

REVIEW: 108243
2013-01-10 02:55:08 -05:00
Albert Astals Cid dec63fb987 Merge remote-tracking branch 'origin/KDE/4.10' 2013-01-07 11:04:39 +01:00
Martin Gräßlin 1d959dea64 Move Desktop Chain management from Workspace into own class
Most recently used virtual desktop chain is only used in the context of
TabBox and therefore moved into this namespace. KWin uses one desktop
chain for each activity. This is mapped by having multiple DesktopChains.
In addition there is a DesktopChainManager which contains all those
chains which are identified by a QString.

The manager gets connected to the signals emitted by VirtualDesktopManager
for changes in virtual desktops and to signals related to Activities
emitted by Workspace. This means the manager is rather generic as it does
not depend on any other components.
2013-01-07 09:47:51 +01:00
Martin Gräßlin 334b4bf622 Move handling of Virtual Desktops into a VirtualDesktopManager
The ownership for virtual desktops is moved from Workspace into a new
VirtualDesktopManager. The manager is responsible for providing the count
of virtual desktops and keeping track of the currently used virtual
desktop.

All methods related to moving between desktops are also moved from
Workspace to the new manager, though all methods related to Clients on
Virtual Desktops remain in Workspace for the time being. This is to have
the new manager as independent from KWin core as possible.

An rather important change for the handling of virtual desktops is that
the count and the id of a desktop is now an unsinged integer instead of
an integer. The reason for that is that we cannot have a negative count
of desktops as well as it is not possible to be on a desktop with a
negative identifier.

In that regard it is important to remember that a Client can be on a
desktop with a negative identifier. The special value for a Client being
on all desktops is handled by using -1 as a desktop. For the time being
this is not adjusted but instead of comparing the virtual desktop ids one
should prefer to use the convenient methods like isOnDesktop and
isOnAllDesktops. This would allow in future to internally change the
representation for on all desktops.
2013-01-07 09:47:51 +01:00
Script Kiddy c6d91ac7eb SVN_SILENT made messages (.desktop file) 2013-01-07 08:11:48 +01:00
Weng Xuetian 6fd8db7af9 Merge branch 'KDE/4.10' 2013-01-06 23:25:01 -05:00
Script Kiddy 93c9fd0f32 SVN_SILENT made messages (.desktop file) 2013-01-04 07:44:10 +01:00