Commit Graph

476 Commits (976037717b9a2552b80f134e9b8c95be62238529)

Author SHA1 Message Date
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 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 fc665106c9 Swap vsync order, trade in 1frame lag
REVIEW: 103058
2012-05-17 11:41:26 +02:00
Martin Gräßlin d14cf2da92 Show detailed information why an effect cannot be loaded
Effects can specify their minimum requirements in their
desktop file:
* OpenGL
* OpenGL 2 (GLSL required)
* Shaders (either ARB or OpenGL 2)

The configuration module uses this information in combination
with which backend KWin is currently using. So if e.g. OpenGL
is used and an effect requires OpenGL 2 a detailed error
message can be showed that OpenGL 2 is required.

BUG: 209213
FIXED-IN: 4.9.0
REVIEW: 104847
2012-05-15 18:02:57 +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 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 6919b4dc94 Drop CompositingPrefs from Compositing KCM
Instead of getting the information from CompositingPrefs
the running KWin instance is queried through D-Bus.
In general the running KWin should have more information
about whether Compositing will work or not.

This means the kcm no longer has to link OpenGL.

REVIEW: 104753
2012-04-29 21:50:09 +02:00
Martin Gräßlin 704902720b Perform detection of CompositingPrefs async
Detecting CompositingPrefs invokes an external program. Waiting
for this can be moved in a second thread.

Due to the introduction of the thread the initialization order
of KWin is changed: the WindowManager is initialized before the
Compositor. Interestingly this makes KWin felt more responsive
as the screen is not frozen for several seconds.

REVIEW: 104579
2012-04-29 21:47:04 +02:00
Alex Fiestas 21c5264efe Remove forward declaration of Kephal stuff (leftover from the port I guess) 2012-04-29 21:07:10 +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 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
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 c175e75939 ConstrainedStackingOrder() return ToplevelList 2012-04-20 08:36:23 +02:00
Thomas Lübking ab86f0e837 add screen inversion through XF86VidModeSetGammaRamp or XRRSetCrtcGamma
use opengl invert effect as fallback

REVIEW: 104371
2012-04-17 21:11:03 +02:00
Thomas Lübking 7bdf96c2f3 export clientpopup mapping state and use it to skip mouse driven focus changes
BUG: 81743
FIXED-IN: 4.9
REVIEW: 104620
2012-04-17 21:08:35 +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
Martin Gräßlin 2fb8fb1c21 Introducing a build option for KActivities support
REVIEW: 104100
2012-03-30 09:13:46 +02:00
Martin Gräßlin d4a919a9bf Demands Attention support for KWin Scripting
Client has a property for demands attention and Workspace
is emitting a signal whenever the demands attention state
of any Client changes.

REVIEW: 104204
2012-03-12 21:25:45 +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
Thomas Lübking b79a176be3 resolve merge conflicts 2012-02-21 19:22:08 +01:00
Thomas Lübking 7e7846adce Focus window under mouse after MouseLowerOp
BUG: 255052
REVIEW: 103975
2012-02-21 17:18:04 +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
Thomas Lübking 48c28a9b3d add dbus debug "activeEffects"
REVIEW: 103572
CCBUG: 288948
CCBUG: 290025
(cherry picked from commit 089aeee91b807d13c0c2b86fa18d05776bef5190)
2012-01-02 18:57:44 +01:00
Thomas Lübking 5b40492a84 add support for graphicssystem selection
REVIEW: 103430
CCBUG: 289904
(cherry picked from commit ded4ed4e9dc32316c41a43b6e906bece4b92338f)
2012-01-02 18:56:21 +01:00
Thomas Lübking 3b2476850e add dbus debug "activeEffects"
REVIEW: 103572
CCBUG: 288948
CCBUG: 290025
2012-01-02 18:54:12 +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
Christophe Giboudeaux 8426e13f3a Fix includes 2011-12-05 15:33:14 +01:00
Aaron Seigo a7ed191184 Merge branch 'libkactivities'
Conflicts:
	kwin/CMakeLists.txt
	libs/kworkspace/CMakeLists.txt
	libs/kworkspace/kactivityconsumer.h
	libs/kworkspace/kactivitycontroller.h
	libs/kworkspace/kactivityinfo.h
	plasma/desktop/shell/activitymanager/activityicon.cpp
2011-12-05 00:33:25 +01:00
Anton Kreuzkamp 98c89bcfd0 Make the window-tabbing group of a window public via an XProperty. 2011-11-07 20:52:21 +01:00
Aaron Seigo dde6a17a0f use libkactivities 2011-11-04 23:23:52 +01:00
Luboš Luňák 1030bcd7f3 keep windows inside workarea if they were there before workarea changes 2011-09-30 17:10:57 +02:00
Luboš Luňák 40744b6b11 use old screen sizes when calculating old window positions on screen size changes 2011-09-30 17:10:57 +02:00
Luboš Luňák 3bd58d49fa so much for copy&pasting a function name 2011-09-29 18:30:20 +02:00
Luboš Luňák 07e3dff871 make checkWorkspacePosition() work also on desktop/screen change
It previously worked only when struts changed, this makes it work
e.g. when moving a window between desktops that have different
struts, or when sending a windows between differently sized screens.
2011-09-29 18:30:20 +02:00
Martin Gräßlin cdfd98e926 Drop the opacity menu in KWin useractions menu (Alt+F3)
See discussion on mailinglist:
http://lists.kde.org/?l=kwin&m=131368803718693&w=2

REVIEW: 102376
2011-08-29 06:59:40 +02:00