Commit Graph

9204 Commits (1f97345e3545a0b9cd9232b0668b39cf6c652a4c)

Author SHA1 Message Date
Martin Gräßlin a4f5c6f203 Improved handling of defines in kwinbindings
* drop NOSLOTS nowhere else used or set
* drop DEF4 as unused
* undef DEF3
* drop KWIN_CONNECT (merged into DEF2 and DEF3)

REVIEW: 104800
2012-05-01 08:46:07 +02:00
Thomas Lübking c8320b0db7 Avoid continious repaints in Present Windows effect
REVIEW: 104787
2012-04-30 22:37:40 +02:00
Thomas Lübking 75b6a04732 add delay before reinit confirmation
required to mitigate false positives due to threaded init code

REVIEW: 104799
2012-04-30 22:37:40 +02:00
Thomas Lübking d6209471e8 sync maximization and quick tiling state in tabs
BUG: 296097
REVIEW: 104293
FIXED-IN: 4.9
2012-04-30 22:37:40 +02:00
Thomas Lübking 77dbf4082f support tabs in directional window switching shortcuts
BUG: 296096
REVIEW: 104293
FIXED-IN: 4.9
2012-04-30 22:37:40 +02:00
Thomas Lübking 49fff98f04 sanitize geom_restore if the window gets quickly untiled after initially being maximized
BUG: 298646
REVIEW: 104715
FIXED-IN: 4.9
2012-04-30 22:37:40 +02:00
Martin Gräßlin abd3808574 Read KWin Script from file moved into thread
The I/O intensive reading of the complete KWin Script
file into a QByteArray is moved into a thread.

Evaluating and setting up the script engine is still
performed in the main thread.

REVIEW: 104782
2012-04-29 22:23:44 +02:00
Martin Gräßlin 6cbdfd3cd5 Move KServiceTypeTrader query for Scripts into a thread
Searching for the scripts to load is performed in an own
thread including unloading of already loaded scripts which
no longer should be loaded.

To ensure that two threads are not trying to load/unload
at the same time a mutex is added to protect the list of
loaded scripts.

REVIEW: 104768
2012-04-29 22:23:44 +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 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
Martin Gräßlin fdd804bdf4 Remove GL context creation from CompositingPrefs
Whether creating the OpenGL context succeeds or not
had no influence in any decisions on the used settings
for OpenGL based compositing.

The only valid information CompositingPrefs still detects
is whether direct rendering should be used which is
performed out of process and does not require a context.

So overall the context creation is not needed and can
be removed.

REVIEW: 104778
2012-04-29 21:46:43 +02:00
Martin Gräßlin 2fc0b8074b Move detection of GLPlatform and printResults into Scene
This means the GLPlatform is filled with values from the
context actually used for Compositing and if XRender
compositing is used no OpenGL information is logged.
2012-04-29 21:44:35 +02:00
Martin Gräßlin 23708521c6 Make GLVSync a complete user controlled variable
There is no need to have it driver specific any more.
All drivers seem to support it (only Intel had been
opt-ed out without any apparent reason shown in commit log).

This was the last driver specific setting which means that
the method applyDriverSpecificSettings() got dropped from
CompositingPrefs.
2012-04-29 21:44:35 +02:00
Martin Gräßlin bcbbf3c5a8 Drop recommendCompositing from CompositingPrefs
It's always true which means it's no longer needed.
2012-04-29 21:44:34 +02:00
Martin Gräßlin d6540c8392 Remove strict binding from compositing prefs
Strict binding follows the driver (GLPlattform) unless
the user has a config value specified in the kwinrc.

For this a new property is added to Options to indicate
whether strict binding is user defined or follows the
driver. In case of driver the strict binding option is
set when OpenGL compositor starts up.
2012-04-29 21:44:34 +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 b49356bc33 Do not perform setupCompositing on Client if Toplevel is not setup
Toplevel::setupCompositing returns a boolean value and returns
false in the cases where it has not setup compositing.

This is used by the specialization on Client to not perform the
Client specific setup if Toplevel has not setup.

REVIEW: 104767
2012-04-28 09:42:26 +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 5803fa2353 Drop CompositingPrefs detection from screenedges kcm
CompositingPrefs have only be used to get the default
value when reading whether the Compositing Enabled
config option.

But CompositingPrefs always returns true which makes
it useless to create an OpenGL context for this.

REVIEW: 104752
2012-04-27 16:41:34 +02:00
Script Kiddy ee27f4d744 SVN_SILENT made messages (.desktop file) 2012-04-25 10:30:51 +02:00
Martin Gräßlin 55980513e7 Fix regressions related to stacking order changes
The change to have stacking order containing
Toplevel inestead of Clients (431aad6d6994695e72697fcc3299ec2cb6f0684e)
introduced possible crashers as recognized in:
http://git.reviewboard.kde.org/r/104519/#review12714

This change fixes these issues by adding missing
null pointer checks after casting to Client.

BUG: 298669
FIXED-IN: 4.9.0
REVIEW: 104714
2012-04-24 22:06:33 +02:00
Thomas Lübking 2fce451be5 allow to sync dynamic Qt props on tabgroups
REVIEW: 104695
2012-04-24 20:41:06 +02:00
Thomas Lübking ae769906de fix quick unmaximization position
CCBUG: 298646
REVIEW: 104702
2012-04-24 20:40:53 +02:00
Lamarque V. Souza 44b2b1e493 Revert "Merge branch 'kwin/active-kconf_update'"
This reverts commit 3676b8dcc9d33155881085ebff6073c372dcd0c9, reversing
changes made to 125533b36bd009b23f659a54d486d73d29081b4f.
2012-04-24 14:57:57 -03:00
Mathias Gottschlag 1d2e3aa327 Let kwin scripts add dynamic properties to client objects.
This enables the script wrapper objects to automatically create new
dynamic properties for Client objects so that scripts can register custom
properties.

REVIEW: 104697
2012-04-24 17:42:16 +02:00
Lamarque V. Souza 64a714b812 Merge branch 'kwin/active-kconf_update' 2012-04-23 17:32:28 -03:00
Hugo Pereira Da Costa 2f9834ad04 Merge branch 'master' of git://anongit.kde.org/kde-workspace 2012-04-23 13:00:36 +02:00
Hugo Pereira Da Costa f76b087b33 mark title transition as dirty when resizing client, to avoid flicker.
CCBUG: 298428
2012-04-23 11:48:30 +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
Martin Gräßlin 7073b0af40 Export workspace as global property on ScriptEngine in QML bindings
If workspace is exported as a context property there seem to be
issues with the signals which are not bound to a property of
WorkspaceWrapper.

This problems seems to be fixable by exporting the workspace
property as a global property on the script engine.

As a side-effect this also resolves the issue with the clientList,
so we can drop the hack again.

REVIEW: 104682
2012-04-21 15:34:37 +02:00
Martin Gräßlin 175668f2b3 Unexport TabGroup property on Client for scripts
TabGroup is not (and should not be) a QObject which
makes it rather useless in scripting. In order to use
window tabs in KWin scripts the methods to interact
with tabs from Client should be used.

REVIEW: 104685
2012-04-21 12:19:52 +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
Thomas Lübking 0f2bde11b0 allow "under mouse" as regular placement strategy
BUG: 272162
REVIEW: 104650
2012-04-20 23:59:36 +02:00
Thomas Lübking b12279b6ed implement mousemark effect for xrender
BUG: 298338
FIXED-IN: 4.8.3
REVIEW: 104674
2012-04-20 23:59:32 +02:00
Thomas Lübking 93729709e6 merge geom_pretile & geom_restore
remove some patch bodies
checkWorkspacePosition on geom_restore

CCBUG: 80265
reviewed-by: graesslin
2012-04-20 23:59:25 +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
Martin Gräßlin f8fd648a61 Move Client::layer() to Toplevel
This allows to copy the layer to the deleted window in order to
keep the deleted window in the same layer.

Additionally a new layer is added for unmanaged windows.
2012-04-20 08:36:23 +02:00
Philipp Knechtges 93b2674313 kwin: dropping several gl(Push|Pop)(Attrib|Matrix) calls
This makes kwin in OpenGL2 mode more coherent with kwin_gles.
Despite some fullscreen effects they should now make the same
(pure) OpenGL calls.

REVIEW: 103804
2012-04-19 21:01:46 +02:00
Script Kiddy 2ebc52e0a5 SVN_SILENT made messages (.desktop file) 2012-04-19 11:15:13 +02:00
Lamarque V. Souza 50169d65c7 Fix compilation. 2012-04-18 10:54:39 -03:00
Lamarque V. Souza bb4616497a Add kwin/data/active (kconf_update configuration for Plasma Active). 2012-04-18 09:00:24 -03:00
Lamarque V. Souza 365b86f0ce Move kwin/data to kwin/data/desktop so that I can add kwin/data/active. 2012-04-18 08:59:40 -03:00
Script Kiddy d84316b20d SVN_SILENT made messages (.desktop file) 2012-04-18 09:37:58 +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