Commit Graph

896 Commits (976037717b9a2552b80f134e9b8c95be62238529)

Author SHA1 Message Date
Martin Gräßlin 7a1fe42be0 Fix uninitialized memory and logic error in PaintRedirector
The refactoring of Compositor starting with b1739c3 caused some
regressions due to variables in Workspace and Compositor not
being initialized. Furthermore there was a boolean logic error
in PaintRedirector causing the decorations not to paint.

BUG: 305875
2012-08-27 19:45:01 +02:00
Martin Gräßlin 62c4d449f5 Use signals'n'slots instead of deep function call into Compositor
For most actions where the compositor needs to perform an action
(e.g. scheduling another repaint) signals were already emitted.
So it's easier to just connect the signals to the Compositor
which in turn makes the code much more readable.

All signals are connected from the Workspace when either the
Compositor gets constructed or a Toplevel gets created.
2012-08-26 20:44:46 +02:00
Martin Gräßlin 0f2e5e61a8 Move reinitializeCompositing and restartKWin into the Compositor
The DBus signal which causes KWin to reinitialize the Compositor
is moved into the Compositor as everything can be handled from
there as well. This comes together with moving the restartKWin
functionality into the Compositor as it is only relevant there.
Restart will only happen if the wrong Qt graphicssystem is used
for the chosen compositing backend.
2012-08-26 20:44:46 +02:00
Martin Gräßlin 28a5487d4d Drop compositing prefixes from methods and variables in Compositor
Yes everything in the Compositor is related to compositing, no
need to state it everywhere.
2012-08-26 20:43:57 +02:00
Martin Gräßlin 2d954a6bf3 Make the Scene owned by the Compositor
The Scene has always been created and destroyed inside what is
now the split out compositor. Which means it is actually owned
by the Compositor. The static pointer has never been needed
inside KWin core. Access to the Scene is not required for the
Window Manager. The only real usage is in the EffectsHandlerImpl
and in utils.h to provide a convenient way to figure out whether
compositing is currently active (scene != NULL).

The EffectsHandlerImpl gets also created by the Compositor after
the Scene is created and gets deleted just before the Scene gets
deleted. This allows to inject the Scene into the EffectsHandlerImpl
to resolve the static access in this class.

The convenient way to access the compositing() in utils.h had
to go. To provide the same feature the Compositor provides a
hasScene() access which has the same behavior as the old method.
In order to keep the code changes small in Workspace and Toplevel
a new method compositing() is defined which properly resolves
the state. A disadvantage is that this can no longer be inlined
and consists of several method calls and pointer checks.
2012-08-26 20:43:57 +02:00
Arthur Arlt f3739469a2 Move Workspace's compositing functions to own class Compositor
All Workspace functions which were implemented in the file composite.cpp
were moved to an own class Compositor. The header entries were moved as well.
All functions calls are updated.
2012-08-26 20:43:56 +02:00
Martin Gräßlin 46996d318e Split the User Actions Menu out of Workspace
All methods and variables related to the User Actions Menu
(rmb window deco, Alt+F3) is moved out of the Workspace class
into an own UserActionsMenu class.

The class needs only a very small public interface containing
methods to show the menu for a Client, closing the menu and
discarding the menu. Everything else is actually private to the
implementation which is one of the reasons why it makes sense
to split the functionality out of the Workspace class.

As a result the methods and variables have more sane names and
the variable names are standardized.

REVIEW: 106085
BUG: 305832
FIXED-IN: 4.10
2012-08-26 20:32:31 +02:00
Martin Gräßlin 5042ca2bdc Adding a screen menu to the Client's useraction menu
New "Move To Screen" menu is shown after the "Move To Desktop"
menu if there are multiple screens and the window can be moved
to another screen. Menu contains one radio button for each
screen.

Selecting an entry sends the Client to the selected screen.

BUG: 269207
FIXED-IN: 4.10
REVIEW: 106065
2012-08-18 09:45:30 +02:00
Martin Gräßlin 90365e27d0 Merge branch 'KDE/4.9'
Conflicts:
	khotkeys/data/kde32b1.khotkeys
	kinfocenter/Modules/opengl/opengl.desktop
	kwin/tabbox/tests/CMakeLists.txt
	plasma/generic/applets/system-monitor/plasma-applet-sm_hdd_activity.desktop
2012-08-17 17:59:49 +02:00
Martin Gräßlin 23f2de009b Effects can provide support information through properties
The supportInformation is extended to also read the properties
on all effects. In addition each effect can be queried just for
itself through D-Bus, e.g.:
qdbus org.kde.kwin /KWin supportInformationForEffect kwin4_effect_blur

All effects are extended to provide their configured and read
settings through properties. In some cases also important
runtime information is exposed.

REVIEW: 105977
BUG: 305338
FIXED-IN: 4.9.1
2012-08-17 17:49:49 +02:00
Martin Gräßlin a394fade64 Remove Tiling support from KWin
As discussed on the mailinglist [1] the tiling support is
removed from KWin. The main reasons for this step are:
* it is unmaintained
* it is a mode not used by any of the core KWin team
* original developer said at Akademy 2012 that he is not
  interested in picking up the work again
* tiling has quite some bugs, e.g. multi screen not supported
* is conflicting with other concepts in KWin, e.g. activities

There is ongoing work to get tiling supported through a KWin
script, which is a preferred way as it does not influence the
existing C++ code base.

[1] http://lists.kde.org/?l=kwin&m=133149673110558&w=2
BUG: 303090
FIXED-IN: 4.10
REVIEW: 105546
2012-07-14 11:18:06 +02:00
Martin Gräßlin 30bb8be037 Add activity support to Workspace Script Wrapper and Effects
New properties for the current activity and the available
activities plus related signals in scripts. Signals added to
effects.

BUG: 302060
FIXED-IN: 4.9.0
2012-06-24 18:35:56 +02:00
Thomas Lübking a6463653b9 move reinitCascading to setNumberOfDesktops because it updates an internal list that is trusted to be of (at least) desktopCount_ size
BUG: 174118
FIXED-IN: 4.9
REVIEW: 105063
2012-05-26 22:04:53 +02:00
Thomas Lübking fc665106c9 Swap vsync order, trade in 1frame lag
REVIEW: 103058
2012-05-17 11:41:26 +02:00
makis marimpis 7de8f5e7fe Add activity support for desktop focus chains.
REVIEW: 104649
BUG: 299309
FIXED-IN: 4.9.0
2012-05-06 15:31:21 +02:00
Thomas Lübking 8436d99e46 fix build for KWIN_BUILD_SCREENEDGES=OFF
BUG: 299326
FIXED-IN: 4.9
2012-05-03 22:56:38 +02:00
Thomas Lübking a332bf183b add desktopChanged signal to effects that carries the optionally changing widget
CCBUG: 213847
FIXED-IN: 4.9
2012-05-03 22:56:27 +02:00
Thomas Lübking 3a6095726e Only reserve required electric borders for ElectricAlways
CCBUG: 293011
REVIEW: 104073
2012-05-03 19:48:20 +02:00
makis marimpis a9e66dc7f3 "New Desktop" in to Desktop menu
Adding a new desktop entry to create a new desktop and move the
selected window there.

REVIEW: 104781
2012-05-03 16:42:25 +02:00
Martin Gräßlin bb5dce0e3b Use KGlobal::config() instead of specifying kwinrc
Inside KWin we can just use the global configuration
instead of manually opening kwinrc which is just the
same.

REVIEW: 104754
2012-04-29 21:55:45 +02:00
Martin Gräßlin be55ac5c60 Introduce post Workspace init phase
Workspace emits a signal when the initialization finished and
interested parties can connect to this signal to perform post
init actions. That is everything that does not have to be
performed to have a completely working Window Manager.

As an example loading the scripts is moved into this post init
phase.

REVIEW: 104580
2012-04-27 19:02:21 +02:00
Martin Gräßlin ed7d612ef3 Ensure that Extension::init() is only performed once
And call init from Workspace ctor before it gets called
somewhere else (e.g. in the compositor).

REVIEW: 104578
2012-04-22 22:29:17 +02:00
Martin Gräßlin 3ed63d4c45 Reparse Configuration at startup asynchronous
Options loading is split into three parts:
* reparse configuration
* loading of non-compositing related options
* loading of composited related options not needing CompositingPrefs

At startup the reparsing of configuration is done through a Thread
to gain a little bit of less waiting.

Before something else accesses the KConfig for the first time we
wait for the thread to finish and perform the other two loading
operations of Options.

The settings depending on CompositingPrefs will only be invoked
if a compositor is going to be needed.

REVIEW: 104562
2012-04-22 22:29:07 +02:00
Martin Gräßlin 818714432f Move Scripting from main to Workspace
Scripting can be started after everything else is started, there
is no reason to have it in main.cpp.
2012-04-22 22:28:56 +02:00
Martin Gräßlin 563dc7fb8e Do not create Deleted on Workspace Shutdown
When the Workspace is shutting down the compositor is torn down
before Clients and Unmanaged are released. This means that there
is no need to create the Deleted windows.

Furthermore creating the Deleted manipulates the stacking_order
while Workspace dtor loops over this list to release all clients.
This may cause crashes.

BUG: 282933
FIXED-IN: 4.9.0
REVIEW: 104690
2012-04-22 17:50:20 +02:00
Thomas Lübking 9ca81a2f79 move sync dbus calls to kactivitymanagerd into extra thread
to prevent broken dbus chain from blocking the compositor

CCBUG: 293104
REVIEW: 104563
2012-04-20 23:59:37 +02:00
Martin Gräßlin c4d8a54e98 Keep position in stacking order for deleted windows
Workspace::addDeleted swaps the Client with the Deleted in the
stacking order. For Unmanaged windows the Deleted is appended
to the stacking order which is the same layer.

When the deleted is closed the window is removed from the stacking
order.

The result is that a deleted window is no longer raised above all
other clients.

REVIEW: 104519
BUG: 158262
FIXED-IN: 4.9.0
2012-04-20 08:36:24 +02:00
Martin Gräßlin f0c6f06241 Stacking Order becomes a list of Toplevel Windows
The common usage of stacking order is to loop through
the list and find a specific Client. All these usages
still need to find a Client. For that the loops are
adjusted to first cast the Toplevel into a Client and
continue if the current item is no Client.

At the moment all entries in the stacking order should
still be Clients as the Deleted are not yet added.
2012-04-20 08:36:24 +02:00
Martin Gräßlin 27643f5a9e Drop kephal dependency from KWin
Kephal has turned into not being more than a wrapper around
QDesktopWidget and does not even provide syntax sugar.

REVIEW: 104427
2012-04-01 08:11:57 +02:00
Martin Gräßlin a0c6f70a0e Drop refresh method on D-Bus interface
The method is nowhere inside KWin called, nor used as a slot.
It's also not used from any of the KCMs and the method does not
do what the name says. It just shows and hides a window as big
as the screen geometry.

REVIEW: 104418
2012-04-01 08:11:54 +02:00
Thomas Lübking 06ab909eb2 check for requested opengl graphicssystem rather than raster twice ;-) 2012-03-30 15:25:49 +02:00
Martin Gräßlin 2fb8fb1c21 Introducing a build option for KActivities support
REVIEW: 104100
2012-03-30 09:13:46 +02:00
Martin Gräßlin 81c6eeb4f4 Remove commented code from old scripting
SVN_SILENT
2012-03-24 08:11:10 +01:00
Thomas Lübking eb83686d56 [Janitorial] Remove legacy "rules" to ignore position request and focus stealing prevention
REVIEW: 104274
2012-03-21 22:32:33 +01:00
Martin Gräßlin 23485fd604 Add graphics system information to debug output 2012-03-08 07:46:21 +01:00
Martin Gräßlin 214375f923 Query KWin for available debug output
This adds extensive support information about the running instance
by printing out all used options, the compositing information
including GL platform, loaded effects and active effects.

The debug output can be retrieved through D-Bus:

qdbus org.kde.kwin /KWin supportInformation

or through a KWin Script (use desktop console):

print(workspace.supportInformation())

REVIEW: 104142
2012-03-04 15:21:10 +01:00
Martin Gräßlin 6c225755fc Drop C++ based Desktop Change OSD
No longer needed as it has been replaced by a declarative script.
2012-03-02 09:10:10 +01:00
Martin Gräßlin 212908ee88 Refactoring of KWin::Options: getter methods instead of public variables 2012-02-27 19:31:58 +01:00
Thomas Lübking 85635dd485 fix tabbing
BUG: 290959
BUG: 265160
BUG: 229292
BUG: 238279
BUG: 290758
BUG: 222831
BUG: 278275
BUG: 245747
BUG: 230000

BUG: 253697
BUG: 230570
BUG: 265977
BUG: 225337
BUG: 225339

REVIEW: 103855
2012-02-11 16:30:22 +01:00
Thomas Lübking bf88ec09ac Revert "fix tabbing"
pushed out of branch, not master - leading to absent revision, found hash collision??

This reverts commit 94b2ad7b85801e37e2df4671cdc4f26b6d7e5506.
2012-02-11 16:29:14 +01:00
Thomas Lübking d245035a17 fix tabbing
BUG: 290959
BUG: 265160
BUG: 229292
BUG: 238279
BUG: 290758
BUG: 222831
BUG: 278275
BUG: 245747
BUG: 230000

BUG: 253697
BUG: 230570
BUG: 265977
BUG: 225337
BUG: 225339

REVIEW: 103855
2012-02-11 16:01:41 +01:00
Martin Gräßlin 7c6155a865 Drop xinerama related options
Behavior is now like all xinerama related options are enabled.
There seems to be no valid reasons to run multi screen without
xinerama support and even if a user would wish to do so she can
just disable xinerama in xorg.conf.

Furhtermore thanks to KWin scripting it is possible to achieve the
behavior as it used to be with the options disabled. E.g. it is
possible to span a window in fullscreen mode over all screens.

This change is in accordance to the discussion on kwin and plasma
mailinglists:
http://mail.kde.org/pipermail/plasma-devel/2012-January/018542.html
2012-02-09 16:52:39 +01:00
Martin Gräßlin 075f6f988a Remove unused scripting import 2012-01-21 10:56:17 +01:00
Thomas Lübking 0b23c516a7 add support for graphicssystem selection
REVIEW: 103430
CCBUG: 289904
2012-01-02 18:53:20 +01:00
Martin Gräßlin a3bed4b7ba Connect Kephal signals directly to screenChangedTimer
No need to have a slot for each screen change which only starts
the screenChangedTimer.
2011-12-31 15:01:41 +01:00
Martin Gräßlin 6f9f736973 Merge branch 'kwin/tabbox-window-strip' into integration 2011-12-21 07:45:52 +01:00
Martin Gräßlin 572cd64af5 Import of a KCM for KWin scripts
This KCM has been implemented by Tamas Krutk in the scope of
Google Code-In.

It is a simple KCM just listing all available scripts and allowing
to import/export them.

This will be further extended alongside the planned scripting changes
in 4.9.
2011-12-21 07:28:51 +01:00
Thomas Lübking 3c3d6c960a Revert "bypass timer for zero delay focus requests"
It's more a timing than an event queue thing?!
This reverts commit 5a3bf46244bfc92aea1ab4683c5b31c018ce1320.
2011-12-06 14:23:04 +01:00
Thomas Lübking a683eeba11 Revert "fix focus delay optimization"
It's more a timing than an event quqe thing?!
This reverts commit c039abe4eadafb16c6556ff07ea091f606b234fb.
2011-12-06 14:22:21 +01:00
Thomas Lübking e1a63303b6 fix focus delay optimization 2011-12-06 13:54:14 +01:00