Commit Graph

273 Commits (9820e4daf6e54d3bf34f50f7eccde2076d2f16fe)

Author SHA1 Message Date
Martin Gräßlin ebbfc26452 Remove superfluous Compositor checks in events.cpp
compositing() ensures that m_compositor is not null.

REVIEW: 106255
2012-09-06 09:55:22 +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 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
Thomas Lübking d546fea565 respect modkey state for the cursor shape
BUG: 228959
FIXED-IN: 4.9
REVIEW: 104986
2012-05-26 13:23:58 +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
Thomas Lübking 603eaca9d4 store focusMousePosition on unmapNotify events
BUG: 92290
FIXED-IN: 4.9
REVIEW: 104620
2012-04-17 21:07:57 +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
Thomas Lübking e99dc3ab5b handle ungrab crossings for FFM & mouse preference
BUG: 142040
REVIEW: 104316
2012-03-18 22:23:27 +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
Thomas Lübking 3b05369ebb Merge branch 'KDE/4.8' 2012-02-04 00:14:58 +01:00
Thomas Lübking 993f4ba583 Revert "skip double focus taking"
The commit actually introduced an windowEvent processing for new created clients
and caused

BUG: 290392
FIXED-IN: 4.8.1

This makes the original code a bit more straight and less confusing and
effectively reverts commit ce97e4fd586ff225f2b2e8c5042baf6821bc52c0.
2012-02-04 00:12:45 +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
Thomas Lübking 3704163a11 Fix indirect(?) wm_take_focus(?) handling
See review request for details, issue might be caused by plasma cashew popup

BUG: 240673
REVIEW: 103700
2012-01-24 22:43:07 +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 55c52977b3 FSUM: honor delay on leave events as well
This makes working around bug #63279 impossible :-(

BUG: 285960
CCBUG: 63279
REVIEW: 103130
2011-12-18 19:51:52 +01:00
Philipp Knechtges 929f0fb643 kwin: adjusting to the latest ewmh spec
Renaming _KDE_NET_WM_OPAQUE_REGION to _NET_WM_OPAQUE_REGION because it
is now an official part of the spec, see
http://www.mail-archive.com/wm-spec-list@gnome.org/msg00842.html
2011-12-13 21:17:19 +01:00
Thomas Lübking 9ea4b566fe skip double focus taking
createwindow -> manage does so anyway
REVIEW: 103337
2011-12-05 21:10:51 +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 6c934998a5 don't request focus by mouse events in the current event cycle
BUG: 279356
BUG: 286116
REVIEW: 103284
2011-11-29 21:11:11 +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
Martin Gräßlin 8b9e7f56cf Pass mouse events to declarative Tabbox
The ListViews have therefore to emit a signal when the item changed
due to a mouse click event.
2011-10-31 14:34:37 +01:00
Philipp Knechtges 2c08a14ff4 kwin: implement _KDE_NET_WM_OPAQUE_REGION
This patch implements an XProperty named _KDE_NET_WM_OPAQUE_REGION
which gives the compositor the information which part of a window
is opaque although it is an ARGB visual. The basic ideas are from
http://www.mail-archive.com/wm-spec-list@gnome.org/msg00715.html

Additionally the patch makes kwin  use this information to do a better
clipping in Scene::paintSimpleScreen which should result in a higher
performance.

REVIEW: 102933
2011-10-23 17:09:44 +02:00
Martin Gräßlin 9930044581 Drop an unimplemented method in Group
We didn't need it for years, so let's remove it and if we
really need it, it's easy to add again.

SVN_SILENT
2011-08-31 07:58:58 +02:00
Thomas Lübking 12b9b1c79e fix xsync protocol
BUG: 160393
REVIEW: 102311
2011-08-24 01:39:34 +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 d8072be54d Move OverlayWindow from Workspace to its own class
All the functionality of Overlay Window is moved to its own class
OverlayWindow. It is created and owned by class Scene, since almost
all function calls are called from this class.

REVIEW: 101866
2011-07-09 19:08:48 +02:00
Martin Gräßlin 039c025bfb Add a build option for screen edge support 2011-07-07 18:29:11 +02:00
Arthur Arlt e6d8585559 Do not include scene.h in workspace.cpp and events.cpp anymore
It is no longer necessary to include scene.h in workspace.cpp and
events.cpp.

REVIEW: 101706
2011-07-05 11:35:27 +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 59a8aac752 Make windowOpacityChanged() a slot
The method windowOpacityChanged is now a protected slot in class Scene. The implementations in the subclasses SceneOpenGL and SceneXRender are the same. The slots are connected to the singal opacityChanged() from Toplevel. The connection is done in the method windowAdded() in both SceneOpenGL and SceneXRender.
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 d1b5d00129 Refactoring TabBox
Move the funtionality of TabBox from class Workspace to class TabBox to make
it possible to deactivate this feature by setting a compile flag.
All methods and variables are now provided by class TabBox and calls from other
classes go directly to TabBox.
The code for configuring the shortcut keys has also been moved to class TabBox
from kwinbindings.cpp.
2011-07-05 10:59:53 +02:00
Arthur Arlt 6e7a249cd0 Rename functions in class ScreenEdge
Since the functions were moved from Workspace to its own class ScreenEdge
and the functionality was formerly called ElectricWindows, the functions still
had the old names. They are now consistenly renamed without redundand naming.
The function calls were updated as well in all classes where ScreenEdge is used.
2011-07-04 13:24:51 +02:00
Arthur Arlt 2f11337d98 Refactoring Screen Edge handling
This commit change the screen edge function calls to be called in the
new class ScreenEdge. The old methods are still in Workspace and will
be removed in a further commit.
2011-07-04 13:24:51 +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 494edbe76f Remove Mouse Emulation from KWin
Mouse Emulation is provided in a better way by KAccess. This provides
a global systemsettings switch to enable mouse emulation instead of
a shortcut and Xkb to enable mouse control with keyboard instead of
sending out fake mouse events.

So no need for duplicated functionality in KWin.

REVIEW: 101406
2011-06-23 11:56:00 +02:00
Martin Gräßlin 026dd17d88 Repaint also old shadow region on geometry change 2011-04-04 18:50:30 +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 12220a0d59 Initial implementation of new Shadows in KWin
For a complete documentation of new functionality refer to:
http://community.kde.org/KWin/Shadow

The current implementation includes a new Shadow class and Toplevel
holds a pointer to an instance of this class. The Shadow class reads
the data from the X11 Property. There is one extended class located
in SceneOpenGL to render the shadow.

Compositor is adjusted to include the shadow region into the painting
passes.

Implementation for XRender still missing and Shadow needs to respond
to size changes of the Toplevel to update cached shadow region and
WindowQuads.
2011-03-27 12:33:07 +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 640fdc7b6d PropertyNotify becomes a signal 2011-03-12 19:18:19 +01:00
Martin Gräßlin 911098ee76 WindowGeometryShapeChanged becomes a signal 2011-03-12 12:34:59 +01:00
Thomas Lübking 0b1599680d stage one, call martin 2011-03-08 22:05:09 +01:00
Martin Gräßlin edd0950f96 WindowOpacityChanged becomes a signal 2011-03-06 10:30:23 +01:00