Commit Graph

946 Commits (7dc2baf74d67761ecee579af26a1b80ba7daa92c)

Author SHA1 Message Date
Thomas Lübking 4999b12387 fix merge... 2013-03-05 19:30:42 +01:00
Thomas Lübking 60a62b2a1a Map NULL_UUID activity to ALL activities
REVIEW: 109274
BUG: 314830
FIXED-IN: 4.10.2
2013-03-05 19:25:23 +01:00
Thomas Lübking c0f3895ba7 Map NULL_UUID activity to ALL activities
REVIEW: 109274
BUG: 314830
FIXED-IN: 4.10.2
2013-03-05 19:22:01 +01:00
Martin Gräßlin b99e1c0a6b Reduce usage of QCursor::pos() and ::setPos()
Where possible it is changed to Cursor::pos(), where we cannot use the
Cursor class (e.g. Aurorae) we can at least try to limit the usage to
prevent roundtrips to the X server.

REVIEW: 109178
2013-02-27 11:46:30 +01:00
Martin Gräßlin be4c76ede1 Port Client::updateCursor to XCB and new Cursor class
The Client::cursor property is changed from QCursor to Qt::CursorShape
and renamed to m_cursor (as all usages are adjusted).

This property is mostly used to define the cursor on e.g. the extended
deco border window. To make this easier a XDefineCursor replacement is
added to xcbutils.h both as a static method and as a member function to
Xcb::Window.
2013-02-25 13:35:15 +01:00
Martin Gräßlin 0348a14a7d Port Client's shape handling to XCB
REVIEW: 108772
2013-02-21 18:04:40 +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
Martin Gräßlin 74097e7d29 Port Client's decoration resize extend input window to XCB
Using Xcb::Window to manage the xcb_window_t and simplify the code - no
longer need to check whether the input_window is valid before calling e.g.
map, as that's handled in Xcb::Window.

One XLib usage for setting cursor is still present. This will be ported
once all the QCursor::handle() get removed.

REVIEW: 108771
2013-02-18 09:44:50 +01:00
Martin Gräßlin 3389d68c50 Print useful information for a Client in scripting
Reusing the debug information already specified for QDebug.

FEATURE: 314402
FIXED-IN: 4.11
REVIEW: 108959
2013-02-18 09:16:31 +01:00
Thomas Lübking fb356a8bef capture condensedTitle config change 2013-01-30 13:07:03 +01:00
Thomas Lübking e2db836def Merge branch 'KDE/4.10'
Conflicts:
	kwin/client.cpp
2013-01-30 12:43:39 +01:00
Thomas Lübking bf2776b42f capture condensedTitle config change 2013-01-30 10:45:21 +01:00
Thomas Lübking 664f06e005 re-fix resetShowingDesktop invocation
was fixed with f9e182068f380fc67b89501bf40f16aa35dd861b
broke it with 3433b31a085a6d3f9439532777cab8fdf1cdf663

REVIEW: 108452
BUG: 302248
2013-01-23 21:28:26 +01:00
Thomas Lübking e642c5cb9d Use the NULL Uuid instead of "ALL"
to indicate "on all activities"

REVIEW: 107855
2013-01-23 21:27:45 +01:00
Thomas Lübking e51e0112c4 re-fix resetShowingDesktop invocation
was fixed with f9e182068f380fc67b89501bf40f16aa35dd861b
broke it with 3433b31a085a6d3f9439532777cab8fdf1cdf663

REVIEW: 108452
BUG: 302248
2013-01-23 21:27:45 +01:00
Martin Gräßlin b967527db3 Use XCB to resolve the X11 Extensions
The extension handling is removed from kwinglobals and moved into the
xcbutils in KWin core in namespace KWin::Xcb. The motivation for this
change is that the Extensions are only used in KWin core and are marked
as internal. So there is no need to have them in the library.

What remains in Extensions are the non-native pixmaps. This will be
removed once we are on Qt 5 as QPixmap can no longer reference an XPixmap.

The remaining code in kwinglobals also still initialize the XLib versions
of extensions emitting events. It seems like there are no XEvents emitted
if not done so even if the extension is correctly initialized with xcb.
This needs to be removed once the event handling is ported over to xcb.

REVIEW: 107832
2013-01-22 07:50:03 +01:00
Martin Gräßlin 5cd223f051 Improved resolving whether a window is on local machine
Most windows use the hostname in WM_CLIENT_MACHINE, but there are windows
using the FQDN (for example libreoffice). So instead of "foo" it is
"foo.local.net" or similar. The logic so far has been unable to properly
determine whether windows with FQDN are on the local system.

In order to solve this problem the handling is split out into an own
class which stores the information of hostname and whether it is a local
machine. This is to not query multiple times. To determine whether the
Client is on the local system getaddrinfo is used for the own hostname
and the FQDN provided in WM_CLIENT_MACHINE. If one of the queried
names matches, we know that it is on the local machine. The old logic to
compare the hostname is still used and getaddrinfo is only a fallback in
case hostname does not match.

The problem with getaddrinfo is, that it accesses the network and by that
could block. To circumvent this problem the calls are moved into threads
by using QtConcurrent::run.

Obviously this brings disadvantages. When trying to resolve whether a
Client is on the local machine and a FQDN is used, the information is
initially wrong. The new ClientMachine class emits a signal when the
information that the system is local becomes available, but for some
things this is just too late:
* window rules are already gathered
* Session Management has already taken place

In both cases this is an acceptable loss. For window rules it just needs
a proper matching of the machine in case of localhost (remote hosts are
not affected). And the case of session management is very academic as it
is unlikely that a restoring session contains remote windows.

BUG: 308391
FIXED-IN: 4.11
REVIEW: 108235
2013-01-21 16:00:49 +01:00
Thomas Lübking d0dd23b7b7 Merge branch 'KDE/4.10' 2013-01-08 20:50:37 +01:00
Thomas Lübking a402c7b801 don't use input windows on Qt < 4.8.3
According to aacid, it's been broken in every Qt version before

BUG: 312784
REVIEW: 108249
2013-01-08 20:48:34 +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
Thomas Lübking 62c62e4336 skip reset states if client untabbed for release
BUG: 310142
FIXED-IN: 4.10
REVIEW: 108003
2013-01-02 19:04:52 +01:00
Thomas Lübking 1727ab1211 skip reset states if client untabbed for release
BUG: 299333
FIXED-IN: 4.10
REVIEW: 108003
2013-01-02 18:24:42 +01:00
Thomas Lübking 77ff44216a invalidate old shade_below before searching a new
for the search could be implicitly skipped and we end up
with a dangeling pointer

BUG: 311340
FIXED-IN: 4.10
2012-12-14 22:36:39 +01:00
Thomas Lübking d6d82b2a08 unlink ExtendedBorderRegion from unstable API
also fix initial mapping state

BUG: 307721
BUG: 308994
FOXED-IN: 4.10
REVIEW: 106715
2012-11-14 21:11:36 +01:00
Brian Nguyen a04e9cbc6f Optimize away XMoveWindow() calls in the common click-and-drag case
This implements an optimization similar to one in compiz which defers updating
the backing X window during a window move until the move is terminated. This
helps alleviate some choppiness when using composite + vsync.

REVIEW: 107256
2012-11-10 11:29:49 +01:00
Cedric Bellegarde 53ae2b91e2 GUI: Kwin appmenu support:
- Add support for application menu button in Kwin
- Add kded appmenu configuration in kcm_style
2012-11-09 13:44:50 +01:00
Martin Gräßlin 9308028fa4 Decoration can announce whether it currently requires an alpha channel
A decoration can provide the AbilityAnnounceAlphaChannel in addition to
AbilityUsesAlphaChannel. If this ability is provided the decoration can
enable/disable the use of the alpha channel through setAlphaEnabled().

The base idea behind this mechanism is to be able to tell the compositor
that currently alpha is not needed. An example is the maximized state in
which the decoration is fully opaque so that there is no need to use the
translucency code path which would render all windows behind the deco.

In addition also the blur effect honors this setting so that behind a
known opaque decoration no blurring is performed.

Oxygen is adjusted to disable translucency in maximized state and Aurorae
is adjusted to allow themes to enable/disable translucency. For Plastik
translucency and with that also blurring is disabled.

REVIEW: 106810
2012-11-09 10:36:43 +01:00
Thomas Lübking 03d782fa73 scripted title manipulation / stripping
REVIEW: 106896
BUG: 308995
2012-11-09 00:37:34 +01:00
Fredrik Höglund 5f220bef2e Revert "delay unsynced window ready_for_painting state"
The next commit will solve this problem in a different way.

This reverts commit e617f176d1e293abcaafbb14d0afcf8aee24f054.
2012-11-07 22:16:49 +01:00
Thomas Lübking 2f63321c0b Merge branch 'KDE/4.9'
Conflicts:
	kwin/composite.cpp
2012-11-01 21:07:35 +01:00
Thomas Lübking 01d4fcec00 update deco borders on shade before aligning tabs
BUG: 308633
FIXED-IN: 4.9.3
2012-11-01 21:01:09 +01:00
Jurica Vukadin bcdc74f8d6 Fix more C++11 narrowing warnings
REVIEW: 106997
2012-10-24 20:43:19 +02:00
Martin Gräßlin 0d81d1d7c0 Move decoration pixmap handling from Client to PaintRedirector
The only task of the PaintRedirector is to redirect the painting of the
window decorations into Pixmaps. So it should actually do this by also
handling the four pixmaps for the decoration. This simplifies the code
as all the logic concerning redirecting the painting is now grouped
together.

Furthermore the PaintRedirector is now a child of the decoration widget,
which means it gets automatically destroyed whenever the decoration is
destroyed - the Client does not have to care about it.

Also the PaintRedirector gets only created if the Compositor is active as
it is not needed in the non-compositing case.

REVIEW: 106620
2012-10-12 07:45:31 +02:00
Martin Gräßlin 6d2dfe06e7 Introduce dedicated OpenGL1 and OpenGL2 compositing types
The CompositingType enum turns into flags and two new values are
introduced: OpenGL1Compositing and OpenGL2Compositing.

Those new values are or-ed to OpenGLCompositing so that a simple check
for the flag OpenGLCompositing works in case of one of those two new
values. To make the generic check for OpenGL compositing easier a method
in EffectsHandler is introduced to just check for this.

The scenes now return either OpenGL1Compositing or OpenGL2Compositing
depending on which Scene implementation. None returns OpenGLCompositing.
2012-09-29 15:33:57 +02:00
Thomas Lübking 3b7c1fb69d correctly align tabbing shade mode, including hover
REVIEW: 106258
BUG: 294410
FIXED-IN: 4.9.2
2012-09-27 22:15:23 +02:00
Thomas Lübking db48a26469 correctly align tabbing shade mode, including hover
REVIEW: 106258
BUG: 294410
FIXED-IN: 4.9.2
2012-09-27 21:53:24 +02:00
Thomas Lübking 24cf0e75f3 Merge branch 'KDE/4.9'
Conflicts:
	kwin/scene.cpp
	plasma/generic/applets/batterymonitor/metadata.desktop
	plasma/generic/applets/lock_logout/metadata.desktop
2012-09-19 20:21:18 +02:00
Thomas Lübking 0921af2129 fix ignoring dektop related windows for showing desktop state 2012-09-19 20:16:33 +02:00
Martin Gräßlin 62d5e8124c Toplevel::windowType becomes a pure virtual function
The method windowType needs actually two implementations:
* one for Clients
* one for Unmanaged

as for Clients also the window rules are checked and hacks are applied
which is both not needed for Unmanaged windows.

To have the Client specific behavior in windowType the function used to
perform two dynamic_casts which made this method one of the most
expensive during compositing, e.g. for ~1000 frames
* called ~43000 times
* ~85000 dynamic casts
* incl. cost of method: 0.24
* self cost of method: 0.05
* incl. cost of the casts: 0.12

After the change to remove the dynamic casts we have for ~1500 frames
in Client::windowType:
* called ~31000 times
* incl. cost of 0.06
* self cost of 0.02

Calls on Unmanaged and Deleted are so low that we do not need to consider
them.

BUG: 306384
FIXED-IN: 4.10
REVIEW: 106349
2012-09-07 08:03:05 +02:00
Martin Gräßlin 7497ef9148 Make the Compositor a proper Singleton
The Compositor class actually behaves like a Singleton so it should be
one. Therefore four static methods are added:
* self() to access the Singleton
* createCompositor() to be used by Workspace to create the instance
* isCreated() to have a simple check whether the Singleton is already
  created
* compositing() as a shortcut to test whether the compositor has been
  created and is active

The isCreated() check is actually required as especially Clients might
be created and trying to access the Compositor before it is setup.
2012-09-06 09:55:22 +02:00
Thomas Lübking a84cfb3a49 kill killhelper in client destructor
BUG: 305157
FIXED-IN: 4.9.1
REVIEW: 106022
2012-08-28 21:08:28 +02:00
Thomas Lübking f18230fe99 ignore dockers for showingDesktop state
also use a common funciton to decide whether or
not to break the state

BUG: 305874
FIXED-IN: 4.9.1
2012-08-28 21:08:28 +02:00
Thomas Lübking 952579bb09 fix untabbing position
the geometry setting needs to happen out of recursion,
has to be smarter for unmaximizing and also no real
place in TabGroup - the client is no longer tabbed thus
it's not the groups task to manage it's geometry.

BUG: 226881
REVIEW: 106182
FIXED-IN: 4.9.1
2012-08-28 21:08:03 +02:00
Thomas Lübking 976037717b delay unsynced window ready_for_painting state
by at max 50ms (and thus trigger a full repaint with the state change)

BUG: 295254
REVIEW: 106173
FIXED-IN: 4.9.1
2012-08-28 21:08:02 +02:00
Thomas Lübking 0d6cee6ccc kill killhelper in client destructor
BUG: 305157
FIXED-IN: 4.9.1
REVIEW: 106022
2012-08-28 15:35:35 +02:00
Thomas Lübking 7d2e62b487 ignore dockers for showingDesktop state
also use a common funciton to decide whether or
not to break the state

BUG: 305874
FIXED-IN: 4.9.1
2012-08-28 15:35:34 +02:00
Thomas Lübking 3460d5b551 fix untabbing position
the geometry setting needs to happen out of recursion,
has to be smarter for unmaximizing and also no real
place in TabGroup - the client is no longer tabbed thus
it's not the groups task to manage it's geometry.

BUG: 226881
REVIEW: 106182
FIXED-IN: 4.9.1
2012-08-28 15:35:29 +02:00
Thomas Lübking a6296dda20 delay unsynced window ready_for_painting state
by at max 50ms (and thus trigger a full repaint with the state change)

BUG: 295254
REVIEW: 106173
FIXED-IN: 4.9.1
2012-08-28 15:34:00 +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 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
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
Thomas Lübking 9390b270f8 substitute mapping_state == Withdrawn by m_managed
as the flamewar pointed out, resetShowingDesktop invalidly keeps hidden windows
the reason is that there're several updateVisiblity calls (notably one from the compositor)
which  break the showingDesktop state as a side effect (before ::manage() does it's thing)

Since they also invalidate the Withdrawn mapping state, that will fail as isManaged() test
(it's also invalidly used by the compositor to set up the decoration, isManaged() used to be
true because of the updateVisibility() call before) since the result is never Withdrawn

CCBUG: 299655
REVIEW: 105303
2012-07-10 01:00:00 +02:00
Thomas Lübking bc24400010 honor rule when updating deco presence for reshape
CCBUG: 301909
REVIEW: 105485
2012-07-10 00:58:31 +02:00
Thomas Lübking 9a15d1921f honor rule when updating deco presence for reshape
CCBUG: 301909
REVIEW: 105485
2012-07-10 00:32:59 +02:00
Thomas Lübking 7340ac59e0 don't consider matching activity list sizes as ALL if size is "1"
CCBUG: 301239
REVIEW: 105195
2012-06-12 23:13:15 +02:00
Thomas Lübking fe2839b95b avoid setOnAllActivities recursion
BUG: 301397
FIXED-IN: 4.9
REVIEW: 105192
2012-06-12 23:12:58 +02:00
Thomas Lübking 11f28732db treat "ALL" activities as all activities when setting activities (aligning it to an empty list as checked elsewhere)
BUG: 300846
FIXED-IN: 4.9
REVIEW: 105113
2012-06-01 16:46:21 +02:00
Casian Andrei 33492358e5 Fix windows like kickoff from disappearing
When trying to launch kickoff (start menu) or the add widgets from
Plasma, they disappeared immediately after appearing, making them
completely unusable.

This regression was traced back to commit
bf0a241c2462072fbc52012784fa51b9b42a1baf.

In Client::setOnActivities, if newActivitiesList was empty, after
joining it and splitting it back, it would contain an empty string, i.e.
it would have a different size than before. This eventually caused the problems.

REVIEW: 105016
2012-05-23 10:50:14 +03:00
Martin Gräßlin d75e7a6d60 Use smart pointers to protect access to TabBoxClient
Client holds a SharedPointer to the TabBoxClient and only
provides access to a WeakPointer which is passed to TabBox.
ClientModel is adjusted to hold a list of WeakPointers instead
of the direct pointers.

This fixes the following reproducable crash:
1. Configure both primary and secondary TabBox with different
   layouts
2. Use primary TabBox
3. Close a window, best the one which used to be active
4. Use secondary TabBox
-> Crash

The reason is that the ClientModel still contains the pointer
to the deleted TabBoxClient in step 3 and while creating the
layout access to the TabBoxClient is needed to get the Client's
icon.

By using the weak pointer it can be ensured that we don't try
to dereference the deleted pointer and prevent the crash.

CCBUG: 290482
CCBUG: 285747
CCBUG: 237345
REVIEW: 105000
2012-05-22 18:37:41 +02:00
Ivan Čukić 0d60a7049d Adds activity window rules to KWin
- adds the kcm rule option to set the activity - one or all option like
  for virtual desktops
- makes the windows obey the rule
- makes the rule enforced even when the user tries to change the
  window's activity via the alt+f3 menu

REVIEW:104972
2012-05-17 16:32:06 +02:00
Martin Gräßlin 38ab8359d7 Simplify construction of TabBoxClientImpl
cppcheck complained about that piece of code and it was not
really good. A TabBoxClient belongs to exactly one Client which
means the setter should for Client should not be there in the
first place and was only used during construction.

REVIEW: 104909
2012-05-11 08:21:01 +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 2fce451be5 allow to sync dynamic Qt props on tabgroups
REVIEW: 104695
2012-04-24 20:41:06 +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 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 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
Thomas Lübking 92939b13d7 detach killHelper process from KWin
BUG: 295940
FIXED-IN: 4.9
REVIEW: 104627
2012-04-17 21:09:44 +02:00
Thomas Lübking 5d6613eb99 withdraw _NET_WM_STATE_DEMANDS_ATTENTION from windows which are attempted t be focus'd but cannot
BUG: 232423
FIXED-IN: 4.9
REVIEW: 104620
2012-04-17 21:09:27 +02:00
Thomas Lübking 651d4e4fbf do not setActive clients which don't take focus on ShadeHover - by this resort re-shade restacking code
BUG: 242217
FIXED-IN: 4.9
REVIEW: 104622
2012-04-17 21:07:16 +02:00
Martin Gräßlin cdc1af7df1 Export blocking compositing as a Client's Q_PROPERTY
Allows to block compositing on Client's from scripts.

Usecase: window rule cannot properly identify buggy
clients and scripting allows to just act on fullscreen
windows.

BUG: 297146
FIXED-IN: 4.9.0
REVIEW: 104448
2012-04-01 08:18:55 +02:00
Thomas Lübking a9478564d8 raise window during shade hover
BUG: 281435
REVIEW: 104280
2012-03-30 15:27:14 +02:00
Thomas Lübking c900455599 don't hover unshade while moving
BUG: 223074
REVIEW: 104280
2012-03-30 15:27:02 +02:00
Thomas Lübking 1070bf895b split decorationRect / visibleRect usage
REVIEW: 104215

cherry-picked from 0f3380f3b10e57416f81a1288dc10b8dfe11d87e
Conflicts:

	kwin/geometry.cpp
	kwin/scene.cpp
2012-03-21 00:36:50 +01:00
Thomas Lübking b0f5e4ac29 remove overzealous maxmode_restore
there's no point in changing the behavior of the maximize button

BUG: 195576
2012-03-14 02:29:56 +01:00
Martin Gräßlin e46f81ec73 Make skipPager and skipTaskbar available to scripts 2012-02-29 18:57:17 +01:00
Martin Gräßlin 212908ee88 Refactoring of KWin::Options: getter methods instead of public variables 2012-02-27 19:31:58 +01:00
Martin Gräßlin 7f0770f99d Properly ifdef everything requiering HAVE_XSYNC
REVIEW: 104080
2012-02-26 17:22:38 +01:00
Thomas Lübking b79a176be3 resolve merge conflicts 2012-02-21 19:22:08 +01:00
Thomas Lübking 802abf09d1 allow windows to withdraw XShape masks
BUG: 293736
REVIEW: 104007
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 033ae96f89 selective rule remembering
REVIEW: 103875
2012-02-09 17:34:08 +01:00
Thomas Lübking 3b05369ebb Merge branch 'KDE/4.8' 2012-02-04 00:14:58 +01:00
Thomas Lübking b2c81216a2 Update decoration buttons when motif hint on the closability changes
BUG: 246422
2012-02-03 19:56:18 +01:00
Martin Gräßlin a38faa4329 Add visibleInClientGroup property 2012-01-27 08:25:21 +01:00
Martin Gräßlin bfdcbe60f5 Turn isManaged and isDeleted into properties on Toplevel
Property invokes virtual methods returning false by default. Deleted
reimplements the isDeleted and returns true. Client returns true for
isClient. Method is not called isManaged as this is already used
inside Client.
2012-01-27 08:21:53 +01:00
Thomas Lübking 4d7161dd75 Delay added signal and other signal bindings for synced windows until the window is actually visually shown
Makes animations of showing windows run completely and thus appear smoother

REVIEW: 103742
2012-01-24 22:43:10 +01:00
Martin Gräßlin 507ff411d6 Drop the WorkspaceProxy in Scripting
Unlike stated at several places in the code it is not difficult to
setup the connections to all Clients.

It would have been nice if the failed attempts to connect the Clients
would not have made it into the code as emitted signals which are
nowhere used. Not to mention that like in all places the signals to
inform that a state changed were emitted before the state changed was
performed.
2012-01-21 10:51:22 +01:00
Thomas Lübking e76ecd7c4c Don't listen to repetitive motif hints regarding the window border and prefer rules over them anyway
BUG: 291312
REVIEW: 103681
FIXED-IN: 4.8
2012-01-13 16:42:39 +01:00
Thomas Lübking 5f2371a47d Don't listen to repetitive motif hints regarding the window border and prefer rules over them anyway
BUG: 291312
REVIEW: 103681
FIXED-IN: 4.8
2012-01-13 15:57:34 +01:00
Martin Gräßlin 8627c12167 Remove stupid code 2012-01-13 09:19:45 +01:00
Martin Gräßlin 698eb631cd ClientGroup becomes scriptable (again)
For this properties are defined in ClientGroup and several methods
are changed to be slots (to be invokable from scripts). On Client
the clientGroup is exported as a property.

The existing wrapper around ClientGroup is dropped as it is no
longer needed. Interestingly it was wrong anyway as it allowed to
construct a new ClientGroup, which has to be done internally.

At the same time the meta declarations get cleaned up a little bit.
2012-01-01 14:43:32 +01:00
Martin Gräßlin 00993ab566 More properties on Toplevel and Client
Mostly exporting the getters used by EffectWindow as Properties.
In client some have got a notify signal.

REVIEW: 103510
2011-12-31 09:19:57 +01:00
Martin Gräßlin f953ed64d4 Minimized property
Adding a convenient method to minimize/unminize the Client.
2011-12-31 08:58:43 +01:00
Martin Gräßlin 20284fb7bb Shade related properties
Adding a convenient method to set a client to shade ignoring the
hover state.
2011-12-31 08:58:42 +01:00
Martin Gräßlin 60f1c75ffb Modal property 2011-12-31 08:58:42 +01:00
Martin Gräßlin 141acf7131 Adding a desktopChanged signal 2011-12-31 08:58:40 +01:00
Martin Gräßlin 01633be601 Add captionChanged signal
Emitted during setCaption. The Q_PROPERTY has no setter as caption
is provided through WM_NAME.
2011-12-31 08:58:40 +01:00
Martin Gräßlin 08ad6c953f Active Property
Emit proper signal when the Client's active status changes.
2011-12-31 08:58:40 +01:00
Martin Gräßlin f47e7bb5ef KWin scripting goes properties
Dropping the wrapper around Client and just exporting the Client's
properties. This breaks all existing scripts as it's now e.g.:
client.caption
instead of
client.caption()

But the first one is the more natural one for JavaScript and also
for everyone writing QML as well.

Setters and signals are mostly still missing in client. Other parts
like ClientGroup must be converted to properties, too.
2011-12-31 08:58:40 +01:00
Martin Gräßlin 6f9f736973 Merge branch 'kwin/tabbox-window-strip' into integration 2011-12-21 07:45:52 +01:00
Thomas Lübking b7d1dbeb86 Honor rules in general isMaximizable/Minimizable/Shadeable queries
REVIEW: 103379
2011-12-10 21:27:11 +01:00
Thomas Lübking 450d90ceb7 unset/set NETWM shading state around minimizing
BUG: 81271
REVIEW: 103377
2011-12-10 21:26:50 +01:00
Martin Gräßlin 6c62fcd400 Make use of resize effect when resizing windows
Fixes a regression. When resize effect is available we can do a
fast resizing by only perform the resizing after the user ended
resizing the window.

REVIEW: 103363
2011-12-09 20:48:46 +01:00
Martin Gräßlin 3955d891d6 Fix minimize rule
It was only applied initially, but force did not work.
REVIEW: 103364
2011-12-09 20:48:46 +01:00
Martin Gräßlin f644c28180 Support for sticky items in TabBox list
This is needed for Plasma Active's home screen which should always
be the first element in the list.
2011-12-01 13:15:11 +01:00
Thomas Lübking dc6d442868 don't ::updateRules() in ::updateActivities()
breaks remember rules when called by ::setActivity() in ::manage()
TODO: add activity rules and make remember state applying more robust in 4.9

BUG: 264981
2011-11-14 12:49:59 +01:00
Fredrik Höglund 9fa2feabc8 kwin: Insert an input-only window above each decorated client
This input-only window is used to capture events above the
client window and preventing them from reaching the client.

It is currently used to enlarge the borders by an invisible
amount, using the ExtendedBorderRegion provided by the
decoration.
2011-11-11 03:02:10 +01:00
Anton Kreuzkamp 9fda63a7f2 Make the tab group XProperty have the right type. 2011-11-09 23:17:49 +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
Fredrik Höglund fe08300505 kwin: Initialize Client::skip_switcher
This fixes a valgrind error
2011-10-29 17:41:16 +02:00
Luboš Luňák 0efbcdb1fa optimize updateVisibility() when not showing the desktop 2011-10-04 10:33:51 +02:00
Thomas Lübking 12b9b1c79e fix xsync protocol
BUG: 160393
REVIEW: 102311
2011-08-24 01:39:34 +02:00
Montel Laurent 62c5a5e276 normalize signal/slots 2011-08-17 23:51:55 +02:00
Martin Gräßlin 0c47ca5e97 Remove defines for X extensions
The following dependencies have become mandatory build deps:
* XRandR
* XRender
* XFixes
* XDamage
* XComposite
2011-08-13 16:46:43 +02:00
Arthur Arlt 85c5439b5d Remove tiling dependency from Client
The direct method calls from class Client were removed and replaced by
connecting to the appropriate signals emitted by class Client. The
affected methods in class Tiling are notifyTilingWindowMinimizeToggle() and
updateAllTiles() which are now private Q_SLOTS.
Including tiling.h in class Client is no longer needed and was removed.
2011-07-28 13:06:30 +02:00
Arthur Arlt 3634525613 Refactoring Tiling
This initial commit introduces a new class Tiling. It is provided by
the files tiling/tiling.h and tiling/tiling.cpp. It covers all the
Tiling functionality which was provided by Workspace. In this initial
commit, all the functions were just moved and adjusted.
A  new member variable m_tiling is introduced to Workspace, which
makes the new class Tiling accessible from Workspace.
The Tiling pointer is created in the constructor and deleted in
the deconstructor. Also a getter method tiling() is provided.
All calls from other classes are updated to use the methods in class
Tiling now.
2011-07-28 12:35:51 +02:00
Thomas Lübking 335dd073cd emit clientFinishUserMovedResized when a client is closed during moveResize
BUG: 277784
2011-07-16 14:23:54 +02:00
Philipp Knechtges fc5e74f4e2 kwin: make decoration repaints window-specific
This gives the new Scene::paintSimpleScreen more room for optimizations.
2011-07-15 10:27:11 +02:00
Thomas Lübking 7057bb2c25 fix new shadows
(cherry picked from commit 6f03f28509834cb145b8548dfd0322cc6d62364f)
2011-07-12 22:20:21 +02:00
Martin Gräßlin 32a82141f0 Adding a build option for KWin Scripting
It is possible that adding this build option broke the Scripting
component. This is something that should not happen. Unfortunately
by just ifdefing everything scripting related with scripting enabled
we have build errors. These are caused by the fact that the scripting
code includes e.g. client.h through "./../client.h". At one offending
place I changed that to "client.h", but there is also a client.h in
the scripting directory.

The includes and naming of the scripting files clearly have to be fixed!
2011-07-10 10:48:25 +02:00
Thomas Lübking 05cbf3f1ca correct workspace position in case of quicktiling or touching the border when the decoration padding changes 2011-07-10 02:24:54 +02:00
Arthur Arlt a9dcadfd33 Including scene.h is no longer necessary in client.cpp
REVIEW: 101847
2011-07-05 11:46:40 +02:00
Arthur Arlt 02e08be5bd Merge signals clientClosed() and unmanagedClosed() to windowClosed()
This commit merges the two signals clientClosed() and unmanagedClosed() to windowClosed() which
is now provided by Toplevel.
The approriate slots in effects.h and effects.cpp were merges as well, since they did the
same.
The direct method calls of the method windowClosed() in SceneOpenGL and SceneXRender were
removed and are now connected to the appropriate signal in windowAdded().
2011-07-05 11:46:13 +02:00
Arthur Arlt b63c9c1af8 Make mothod windowGeometryShapeChanged() a slot
The method windowGeometryShapeChanged() from the class Scene is now a slot. It is now connected to the signal geometryShapeChanged() which is sent from Toplevel instances Client and Unmanaged.
All direct method calls were deleted.
2011-07-05 11:34:12 +02:00
Arthur Arlt 903bcb42fb Provide build option for TabBox functionality
Since the TabBox functionality is not feasible for any platform KWin is
used on (e.g. tablet PCs), a build option is added to decide, if the
TabBox functionality should be build or not.

REVIEW: 101511

@Sebastian: Martin wanted me to let you know that it is now possible
to disable building Tabbox
CCMAIL: sebas@kde.org
2011-07-05 11:00:23 +02:00
Arthur Arlt 25654f25b8 Removing TopMenu
Since the funtionality of TopMenu did no longer work in KDE4 this feature was
removed from Workspace. Every reference to it was removed as well as commentaries
and documentation.

REVIEW: 101485
2011-06-24 12:27:56 +02:00
Martin Gräßlin 66d22738e4 Disable PaintRedirector when non-composited
Without Compositing we do not really need the PaintRedirector,
it only adds overhead. This reverts the behavior to how it was before
the PaintRedirector was introduced by just not redirecting the paint
in the event filter when compositing is not active. This should have
the lowest impact on the existing source base.

The change breaks at least oxygen window decoration when compositing
is not active as the decoration is no longer double buffered. But
as written this is exactly the behavior as used before 4.3. Given
the push today there should be enough time for all affected decos
to adjust to the change.

REVIEW: 101413
2011-06-23 12:37:15 +02:00
Martin Gräßlin 12d3b354fc Remove drawbound move/resize functionality
Drawbound was nowadays only used when compositing is disabled.
For the composited case, the drawbound was replaced by the resize
effect and in fact we should always just use the resize effect.

REVIEW: 101411
2011-06-23 12:15:54 +02:00
Montel Laurent e08f67ff6e Make it compile with "-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS" 2011-05-22 13:53:25 +02:00
Philipp Knechtges 2c0b0e9f18 Performance bugfix.
In case we use OpenGL compositing and KWin is started with the raster graphicssystem,
the decoration gets painted with the raster backend.
REVIEW: 101370
2011-05-18 21:27:11 +02:00
Martin Gräßlin 234ec644d2 KWin supports graphicssystem Raster
With raster a QPixmap is no longer a XPixmap which fails all code
which assumes that an QPixmap is an XPixmap. Depending on were in
the codebase we either convert such pixmaps to images (OpenGL) or
create a XPixmap and use QPixmap::fromX11Pixmap to get a "real"
pixmap.

It is possible that there are more code pathes were we would need
a XPixmap. Currently tested is basic functionality of no-compositing,
XRender compositing, OpenGl/GLX and OpenGL ES/EGL compositing.

For OpenGL compositing raster might result in performance improvements,
for XRender it is possible that there are regressions when using raster.
By default KWin uses whatever is the default of the system, so we just
no longer enforce native.

Of course it is a bad idea to use graphicssystem OpenGL. As that
is broken anyways in Qt, we do not check for it.

Many thanks to Philipp Knechtges for bringing up the issue, convincing
me that we need it and providing most of the patch.

REVIEW: 101132
CCMAIL: Philipp.Knechtges@rwth-aachen.de
2011-05-12 18:52:38 +02:00
Martin Gräßlin f97c92fde9 KWin does not require a decoration plugin any more
With config option "NoPlugin" in group "Style" it is possible to
no request that KWin should be run without a decoration plugin.
This is a change for Plasma Active to properly support no decorations.

As well if a decoration plugin cannot be loaded, KWin will no longer
exit, but continue to run just without a decoration. As a nice
side-effect changes in Oxygen no longer destroy my kwin build ;-)

BUG: 224440
FIXED-IN: 4.7.0
CCMAIL: sebas@kde.org
2011-04-28 16:05:23 +02:00
Thomas Lübking 65237d9c8c finegrain decobutton reload so that it doesn't happen with every max/restore event 2011-04-23 17:17:48 +02:00
Martin Gräßlin 2d066a710c Fix repainting of Shadows for torn-off toolbars
Toolbars and Dock Widgets are clients which did not yet have
proper Shadow support. Especially the visibleRect and decorationRect
which is incorrectly used to refer to the complete window geometry
had to be updated.
2011-04-10 21:26:46 +02:00
Martin Gräßlin 320de6abc6 Merge branch 'master' into oxygen-shadows
Conflicts:
	kwin/atoms.cpp
	kwin/atoms.h
2011-04-04 18:09:59 +02:00
Thomas Lübking 31278d570e add rule/property based composite blocking 2011-04-04 01:59:52 +02:00
Martin Gräßlin 7287019050 Update cached Shadow information on size changes
In order to notice when the geometry changes a new signal is
added to toplevel and both Unmanaged and Client connect all their
signals which are emitted whenever the geometry changes in some way
to this new signal.

Shadow connects to the signal and updates the quads and region
whenever the size changes.
2011-04-03 12:43:57 +02:00
Martin Gräßlin b52975a57e Merge branch 'libkwineffects'
The branch contains the first step in reworking the kwineffects
library. This includes:
* replacing virtuals by signals and slots
* dropping some unused methods
* remove KWin::TimeLine

More to come.

Conflicts:
	kwin/workspace.cpp
2011-03-16 19:46:59 +01:00
Martin Gräßlin c4381dc1f9 Deinclude effects.h in files where not needed any more 2011-03-13 13:25:34 +01:00
Martin Gräßlin 911098ee76 WindowGeometryShapeChanged becomes a signal 2011-03-12 12:34:59 +01:00
Thomas Lübking dd19f5e1a7 Unlink maximization state from actual geometry
Since clients with restricted geometry now cannot cover the entire screen by default it was necessary to unlink the state from the actual geometry to re-provide the "restore" feature.
The patch also extends the protection of the maximized state to unilateral maximizations (emacs issue)

BUG: 265568
BUG: 252314
CCBUG: 252255
review request https://git.reviewboard.kde.org/r/100606/
2011-03-08 21:48:08 +01:00
Martin Gräßlin a404ec4259 WindowUnminimized becomes a signal 2011-03-06 11:08:19 +01:00
Martin Gräßlin 012222037e WindowMinimized becomes a signal 2011-03-06 10:55:27 +01:00
Martin Gräßlin 0b85768ec5 EffectsHandler emits windowClosed signal
Client and Unmanaged use a signal to notify that they are about to be closed.
The EffectsHandlerImpl is connected to those signals and emits the appropriate
windowClosed signal to which the effects are connected.
2011-02-27 09:25:45 +01:00
Thomas Lübking eba4392272 Update deco buttons when allowed actions change
BUG: 246442
2011-02-06 16:42:45 +01:00
Martin Gräßlin 0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +01:00
Chani Armitage 7ce380497f Merge branch 'allactivities'
svn path=/trunk/KDE/kdebase/workspace/; revision=1207069
2010-12-16 20:14:22 +00:00
Thomas Lübking 746cdddf76 adjust/fix behaviour of Modal Dialogs reg. Minimizing, Virtual Desktop change & Shading
BUG: 193611
BUG: 180195

svn path=/trunk/KDE/kdebase/workspace/; revision=1194907
2010-11-10 03:01:49 +00:00
Kevin Ottens ff61f40d8d Don't rely on the kdgstream typedef which is deprecated. Use QDebug
directly.

svn path=/trunk/KDE/kdebase/workspace/; revision=1190379
2010-10-27 14:16:56 +00:00
Martin Gräßlin 545801de62 Unset noBorder when switching from Netbook to Desktop Shell.
Check on reloading of settings if the no borders for maximized windows option got disabled.
If it got disabled unset the no border option for all maximized windows to get the borders back.
BUG: 222045
FIXED-IN: 4.6.0

svn path=/trunk/KDE/kdebase/workspace/; revision=1189981
2010-10-26 14:43:29 +00:00
Martin Gräßlin c87be852e0 Improved focus chain handling for client groups.
When selecting another client in the group, the previous client
gets hidden which causes the client to be moved to the end of
the focus chain which means that it is not possible to quickly
alt+tab to the previous used tab.
So if a client is part of a client group it should not be moved
to the end of the focus change when changing the shown state in
Client::setClientShown().

svn path=/trunk/KDE/kdebase/workspace/; revision=1179234
2010-09-24 21:34:20 +00:00
Chani Armitage 3c633a48ab Use an X property for activity associations
the new property name is "_KDE_NET_WM_ACTIVITIES", of type XA_STRING,
and it's a comma-separated list of activity UUIDs.

kwin should respond to other processes changing the activity list for a
window, and filter out any bogus IDs. It also caches KActivityController's
list of activities to prevent dbus deadlocks.

CCMAIL: plasma-devel@kde.org

svn path=/trunk/KDE/kdebase/workspace/; revision=1179043
2010-09-24 12:03:22 +00:00
Christoph Feck 3fca254f83 SVN_SILENT compile
svn path=/trunk/KDE/kdebase/workspace/; revision=1177897
2010-09-21 15:56:20 +00:00
Rohan Ramdas Prabhu 2aec750ebf Trembles the weave as the clock ticks, attain another microstate.
Every disorder causes every duration, which ensures the one that stays.
reality is relative. natural is disorder.
[R]obinhood[P]andey

Merging scripting from
^/branches/work/kwin_scripting TO
^/trunk

svn path=/trunk/KDE/kdebase/workspace/; revision=1177865
2010-09-21 14:31:40 +00:00
Martin Gräßlin 73a3e3ca2d When restarting kwin and there is a shaded group, set shade is called before a decoration is created. Catch this case, so that kwin doesn't crash.
This fix is related to rev 1140342.
CCBUG: 242206

svn path=/trunk/KDE/kdebase/workspace/; revision=1140343
2010-06-20 12:21:44 +00:00
Martin Gräßlin 5b54bb1d03 Forward port rev 1137263:
Make icon sizes 64x64 and 128x128 available in KWin and use it in TabBox for large icon modes.
So no more ugly upscaling.
CCBUG: 241384

svn path=/trunk/KDE/kdebase/workspace/; revision=1137264
2010-06-12 06:56:40 +00:00
Chani Armitage d44b3f11f1 update window groups properly when activities change
also cleaned up the activity functions a little

svn path=/trunk/KDE/kdebase/workspace/; revision=1128678
2010-05-19 22:32:57 +00:00
Chani Armitage 24c7f96416 update activity of transients properly
svn path=/trunk/KDE/kdebase/workspace/; revision=1128655
2010-05-19 21:02:40 +00:00
Chani Armitage 741e0cdecd SVN_SILENT: code style
svn path=/trunk/KDE/kdebase/workspace/; revision=1126063
2010-05-13 04:56:38 +00:00
Chani Armitage 59590a5993 react to activity removal
svn path=/trunk/KDE/kdebase/workspace/; revision=1126057
2010-05-13 04:06:27 +00:00
Chani Armitage 30313d2869 take advantage of the cached currentActivity
svn path=/trunk/KDE/kdebase/workspace/; revision=1126054
2010-05-13 03:10:31 +00:00
Chani Armitage a9ad071575 Activity association for windows.
ok'd by fredrikh.
this code is buggy right now, but I promise to squash the bugs by the 19th :)


svn path=/trunk/KDE/kdebase/workspace/; revision=1125614
2010-05-11 20:30:20 +00:00
Nikhil Marathe 2163f87264 Modified workspace method names to mark them up as referring to tiling
svn path=/trunk/KDE/kdebase/workspace/; revision=1125434
2010-05-11 11:10:53 +00:00
Martin Gräßlin fa7f160cb3 Window specific setting to skip window switchers (tabbox, present windows, desktop grid).
FEATURE: 171192
CCBUG: 179723

svn path=/trunk/KDE/kdebase/workspace/; revision=1122404
2010-05-03 20:04:44 +00:00
Nikhil Marathe 5fc7e93d69 Tiling is here!
This commit merges the kwin-tiling branch. Ideally it shouldn't break anything and add a few features ;-)
It was applied as a patch. Do not attempt to merge the branch directly, it has a few issues.
This feature is currently experimental, although it hasn't crashed in quite a long time. It lacks some features and probably leaks some memory. Fixes will be on the way.

Season Of KDE 2009 project by Nikhil Marathe

svn path=/trunk/KDE/kdebase/workspace/; revision=1118677
2010-04-25 16:43:14 +00:00
Fredrik Höglund 8ce52d5cc0 Check if the decoration pixmaps need to be resized before resizing them.
svn path=/trunk/KDE/kdebase/workspace/; revision=1104070
2010-03-16 16:37:08 +00:00
Luboš Luňák a2f94886d0 remove now unused variable
svn path=/trunk/KDE/kdebase/workspace/; revision=1087538
2010-02-09 10:39:18 +00:00
Martin Gräßlin 3470845dcf Replace do_show with !noBorder(). This should prevent a crash in conjunction with Plasma netbook.
I think it's too late in the cycle to backport to 4.4.0 so if it does not cause any other problems, I will backport to 4.4 branch.
(In case I forget to backport as I am busy with non-kwin issues, please remind me in the bugreport)
Thanks to Thomas Leineweber for providing the patch and investigating the issue.
BUG: 221868

svn path=/trunk/KDE/kdebase/workspace/; revision=1084748
2010-02-03 17:43:47 +00:00
Martin Gräßlin 21821f48a4 Less krazy warnings: use prefix ++ instead of postfix.
SVN_SILENT

svn path=/trunk/KDE/kdebase/workspace/; revision=1063341
2009-12-17 21:35:37 +00:00
Fredrik Höglund 586f4e9010 Check if the decoration supports the frame overlap strut in
Client::transparentRect() and Client::layoutDecorationRects().

svn path=/trunk/KDE/kdebase/workspace/; revision=1063057
2009-12-16 20:51:54 +00:00
Lucas Murray 72b50354a0 Swap if statements around so it makes more sense. Also fix possible
logic error.

svn path=/trunk/KDE/kdebase/workspace/; revision=1062369
2009-12-14 13:30:39 +00:00
Lucas Murray 89e8c3f186 Make Client::setClientShown() a no-op if it's not required. (Maybe fixes
focus stealing prevention for ungrouped windows?)

svn path=/trunk/KDE/kdebase/workspace/; revision=1062368
2009-12-14 13:26:39 +00:00
Thomas Lübking 99b912e91e catch client_group on caption change, caused segfault after switchiing between tabbing and non-tabbing decos
svn path=/trunk/KDE/kdebase/workspace/; revision=1062020
2009-12-13 15:23:22 +00:00
Fredrik Höglund 18c0ca2ff5 Ignore the frame overlap strut when compositing is disabled, and return
a null rect in transparentRect() when the window is shaded.

svn path=/trunk/KDE/kdebase/workspace/; revision=1056399
2009-11-30 00:37:52 +00:00
Fredrik Höglund 0a8c06b054 Implement support for _KDE_NET_WM_FRAME_OVERLAP.
svn path=/trunk/KDE/kdebase/workspace/; revision=1054393
2009-11-25 23:32:35 +00:00
Jacopo De Simoi 637ff72e1f Make sure that the paintredirector pending region is added to the repaint region only once in case the window gets minimized.
TAB--

svn path=/trunk/KDE/kdebase/workspace/; revision=1050675
2009-11-17 21:34:58 +00:00
Lucas Murray 78d1aed9f7 Add setting to hide inactive tabs from the taskbar but hide it in the UI
for now as: 1) It causes taskbar items to reshuffle, and 2) Switching
the setting during a session currently requires applications to be
restarted as well for their skip taskbar status to be reset.

svn path=/trunk/KDE/kdebase/workspace/; revision=1050472
2009-11-17 11:25:03 +00:00
Lucas Murray 7fe224e579 Don't change the client group visible status of a window if it is being
deleted. Hopefully fixes a crash in Client::exportMappingState().

svn path=/trunk/KDE/kdebase/workspace/; revision=1050010
2009-11-16 11:38:26 +00:00
Lucas Murray fad5724f33 Add clients to a NULL group when they are released if they were in a
group before.

svn path=/trunk/KDE/kdebase/workspace/; revision=1049887
2009-11-16 02:39:16 +00:00
Lucas Murray a0d07d12a2 Merged r970865:1049322 from /branches/work/kwin-tabbing
Adds window tabbing support to KWin.
FEATURE: 42023

svn path=/trunk/KDE/kdebase/workspace/; revision=1049334
2009-11-15 03:24:04 +00:00
Jacopo De Simoi 6317e2ef3a We still need to add the repaints, but first check if it is indeed the case
svn path=/trunk/KDE/kdebase/workspace/; revision=1047737
2009-11-11 23:37:40 +00:00
Jacopo De Simoi 71a73acae8 Avoids a nasty race condition that caused corrupted window decorations
BUG:199735


svn path=/trunk/KDE/kdebase/workspace/; revision=1046461
2009-11-08 19:47:58 +00:00
Lucas Murray 65e8bea70d Make quick maximization and tiling more intuitive by handling resize and
move operations in a logical fashion when a window is in the maximized
or tiled state.

svn path=/trunk/KDE/kdebase/workspace/; revision=1035021
2009-10-14 09:33:00 +00:00
Lucas Murray 743e058af5 Detect when _MOTIF_WM_HINTS gains or loses the no border hint.
Patch by Daniel Erat.
BUG: 201523

svn path=/trunk/KDE/kdebase/workspace/; revision=1030932
2009-10-03 14:32:24 +00:00
Robin Harold Burchell 102ec081e2 Extend on the quicktiling(/snap) work by mgraesslin in r1021305:
- Add hotkeys for snap left/snap right, kwin won't need a seperate hotkey for snap up, as maximize will do that job for us, and it already has a hotkey
 - Add geometry restoring to quick tile, meaning that windows can be moved back to their original state after a tile, useful if just looking at something quickly.

Thanks to mgraesslin for review and lots of mentoring.

svn path=/trunk/KDE/kdebase/workspace/; revision=1022987
2009-09-13 17:09:44 +00:00
Martin Gräßlin 76f17e6de1 Here comes the new TabBox. It is a complete rewrite using a MVC approach. Here some highlights:
* Models and Delegates for Clients and Desktops
 * Horizontal, vertical and tabular layout
 * Layout of one item can be configured by an XML definition
 * A desktop item can include a client list
 * An optional second list view showing only the selected item
 * A new KCM "kwintabbox"
 * An alternative TabBox with independent settings and keybindings
 * Optional Highlight Windows effect integration
 * List scrolls instead of removing items
 * Scroll wheel support
 * Cursor key support
 * Middle click on item closes window
BUG: 195745
BUG: 197187
BUG: 201103
FEATURE: 118184
FEATURE: 156723
FEATURE: 177441
FEATURE: 182897
FEATURE: 193882
GUI:

svn path=/trunk/KDE/kdebase/workspace/; revision=1022861
2009-09-13 11:36:45 +00:00
Andreas Kling 00b1ad8e18 Plug an X11 property leak in Client::getSyncCounter()
svn path=/trunk/KDE/kdebase/workspace/; revision=1022615
2009-09-12 09:42:03 +00:00
Robin Harold Burchell f585e4e1d9 A number of small warning fixes (bracketing, etc) to help pick up real problems when working.
svn path=/trunk/KDE/kdebase/workspace/; revision=1022531
2009-09-11 23:44:29 +00:00
Martin Gräßlin 754f5d0829 Quick maximize and tiling when moving a window to the left/right or top screen edge.
Top screen edge (un)maximizes. Left screen edge sets window to left half of screen geometry, right edge to other half.

svn path=/trunk/KDE/kdebase/workspace/; revision=1021305
2009-09-08 20:01:08 +00:00
Martin Gräßlin 807891fcb0 Initialize the padding variables. This could be the solution to the problems with non-bordered windows like KRunner and Yakuake.
Anyone experience this problem please test and report if you still have crashes.
CCBUG: 196877

svn path=/trunk/KDE/kdebase/workspace/; revision=1001997
2009-07-24 18:32:24 +00:00
Fredrik Höglund 3685b3260a Make sure that the repainted area includes the whole area
used by the decoration.

This fixes ghost shadows being left behind when windows
are minimized.

svn path=/trunk/KDE/kdebase/workspace/; revision=980474
2009-06-11 20:12:11 +00:00
Martin Gräßlin c561207946 Do not release the bound pixmap every time the decoration get's updated. That is the reason why effects were slow when active client changed. Additional do a XSync when the decoration pixmap is painted. That ensures that the pixmap is painted before the texture from pixmap is done.
BUG: 191694

svn path=/trunk/KDE/kdebase/workspace/; revision=969647
2009-05-18 16:42:23 +00:00
Fredrik Höglund 8bba7aed7d Make it possible for the decorations to paint outside the window frame
when compositing is enabled, by letting them add additional padding
to the sides of the frame.

svn path=/trunk/KDE/kdebase/workspace/; revision=963586
2009-05-04 22:35:33 +00:00
Martin Gräßlin 1c45f2a2d8 Forgot to add the changes to client for argb decoration (rev 957681)
svn path=/trunk/KDE/kdebase/workspace/; revision=957718
2009-04-22 19:00:51 +00:00
Fredrik Höglund e92aab0518 Implement initial support for ARGB window decorations.
Based on earlier work done by Lubos Lunak and ideas by Lucas Murray.

svn path=/trunk/KDE/kdebase/workspace/; revision=957680
2009-04-22 17:29:56 +00:00
Lucas Murray ca901dae30 Improved window movement around struts. Windows can be moved anywhere
where the titlebar is still clickable even if it is outside the normal
work area. When struts are added or removed only move the windows that
cover the same area, leave all others untouched. If a strut is removed
on a xinerama screen that is not on the edge of the full desktop area
prevent the windows from being moved offscreen. Prevent struts/panels
from interfering with the movement of windows on other xinerama screens.
BUG: 74559
BUG: 90833
BUG: 160068

svn path=/trunk/KDE/kdebase/workspace/; revision=927466
2009-02-17 15:50:00 +00:00
Luboš Luňák edcd0112fa Allow minimizing of modal dialogs, simply meaning that their main window
will be minimized too. Also don't disable the minimize animation for the dialog.
(bnc#431378)


svn path=/trunk/KDE/kdebase/workspace/; revision=908237
2009-01-09 14:07:03 +00:00
Luboš Luňák 707118ca3c Compile in one line :).
svn path=/trunk/KDE/kdebase/workspace/; revision=898863
2008-12-19 10:32:54 +00:00