Commit graph

10044 commits

Author SHA1 Message Date
Martin Gräßlin
a1ac6df20e Move XRender based rendering of unstyled EffectFrame into scene_xrender
This follows how it is done for OpenGL where the renderRoundBox() got
dropped some time ago.

New implementation implements the box with round corners using xrender
directly instead of using a QPainter on a QPixmap.
2013-02-14 14:20:26 +01:00
Martin Gräßlin
368de6842a Wrapper class to create an xcb_xfixes_region_t from a QRegion
Replaces the previously existing method to convert a QRegion which did
not take care of freeing the region again.

Usages are ported over.
2013-02-14 14:20:26 +01:00
Martin Gräßlin
97ba1ebd1e Use KConfigXT in KWin::Options
For the time being the current design of Options is more or less kept to
not have to adjust KWin code all over the place. Also for some parts the
generated class from KConfigXT cannot be used due to inter-settings
dependencies defined in the setters.

Options now holds a pointer to a Settings object which is generated from
KConfigXT and uses it to read the default values and the individual
settings. This means the static default value methods are dropped and the
variables are initialized with a normal default value (all int 0, all
boolean false and so on) in the initializer list. Afterwards the values
are set to the correct default value through KConfigXT.

So far for the first step only Windows category is using KConfigXT.

REVIEW: 108572
2013-02-14 08:29:03 +01:00
Martin Gräßlin
e8887aa620 Drop TabBoxAlternative group from kconfigxt
Apparently it's not allowed to have two groups with the same entry names.
Parameterized groups are still a "TODO" and a group must have a name.
Looks like we won't be able to use KConfigXT for TabBox.
2013-02-14 08:23:35 +01:00
Martin Gräßlin
45042010e2 Drop the tools directory from KWin
Tried to compile it and at least decobenchmark does not compile due to
missing include to QObject in header file using QObject. I don't know
how long that is a requirement, but it shows that nobody has tried to
use it for quite some time.

REVIEW: 108792
2013-02-14 08:17:52 +01:00
Martin Gräßlin
8205adcac3 Export Toplevel to KWin::Scripts
Without the scripting system is not able to handle signals defined on
Toplevel instead of Client.

REVIEW: 108807
2013-02-14 08:16:19 +01:00
Martin Gräßlin
05541740ac Don't activate screen edge actions when moving a Client
This only results in problems if e.g. Desktop Grid is activated when
trying to quick tile a window.

REVIEW: 108940
2013-02-14 08:14:01 +01:00
Luca Beltrame
f0cdfefd1c Merge remote-tracking branch 'origin/KDE/4.10'
You don't need to cherry-pick if you find a conflict in a .desktop file
made by Scripty.

Just use git checkout --ours <path to .desktop file> and then git add
<path to .desktop file>.

Thomas, I picked the versions from master for these conflicts, please
review that I did not mess up anything.

CCMAIL: thomas.luebking@gmail.com

Conflicts:
	kwin/layers.cpp
	kwin/screenedge.cpp
	kwin/workspace.h
	plasma/generic/applets/batterymonitor/metadata.desktop
	plasma/generic/applets/lock_logout/metadata.desktop
2013-02-13 07:43:32 +01:00
Script Kiddy
0bd6e413b2 SVN_SILENT made messages (.desktop file) 2013-02-13 00:36:34 +01:00
Thomas Lübking
e796399cd4 restore inputfocus after assigning window shortcut
BUG: 314760
FIXED-IN: 4.10.1
REVIEW: 108887
(cherry picked from commit e71774897d092327b6d860353658fdaca79f7d0f)
2013-02-12 22:38:47 +01:00
Thomas Lübking
c395d6e66c fix mouse button order
X counts the middle button as 2 and right as 3, Qt as 4 and 2 resp. the flags
... we shall at least match our GUI ;-)

BUG: 314756
FIXED-IN: 4.10.1
REVIEW: 108883
2013-02-12 21:59:22 +01:00
Thomas Lübking
f5744fa224 catch releases without presses
happens when the polling misses the press when doing more
important things

also shortcut buttons == oldButtons

BUG: 314762
FIXED-IN: 4.10.1
REVIEW: 108883
2013-02-12 21:59:22 +01:00
Thomas Lübking
004bdee7a2 do not try to raise possible panel proxies
but drop screenedges below the supportWindow instead
that's why it exists, that's deterministic, that's faster

includes adaption to new screenedge and xcb invocation (compared to 4.10)

BUG: 314625
FIXED-IN: 4.10.1
REVIEW: 108867
2013-02-12 21:58:46 +01:00
Thomas Lübking
b233288439 fix mouse button order
X counts the middle button as 2 and right as 3, Qt as 4 and 2 resp. the flags
... we shall at least match our GUI ;-)

BUG: 314756
FIXED-IN: 4.10.1
REVIEW: 108883
2013-02-12 21:16:35 +01:00
Thomas Lübking
e36e5efab8 catch releases without presses
happens when the polling misses the press when doing more
important things

also shortcut buttons == oldButtons

BUG: 314762
FIXED-IN: 4.10.1
REVIEW: 108883
2013-02-12 21:16:29 +01:00
Thomas Lübking
199f14d578 do not try to raise possible panel proxies
but drop screenedges below the supportWindow instead
that's why it exists, that's deterministic, that's faster

BUG: 314625
FIXED-IN: 4.10.1
REVIEW: 108867
2013-02-12 21:16:01 +01:00
Thomas Lübking
c016589fcd Try to keep the labels in the expanded geometry
and ensure to repaint labels for very tiny windows
Also move to LayerRepaints

BUG: 278137
FIXED-IN: 4.10.1
REVIEW: 108676
(cherry picked from commit 1365f04435f0bbbc74301988b778f7fdf1ad4fd8)
2013-02-12 21:15:55 +01:00
Thomas Lübking
1cc5c2ff3f react on screenCountChanged to re-validate lists
includes fixing commit 1ac2f407c67c5740fb79cb11b610814a056b3268

BUG: 314409
REVIEW: 108775
FIXED-IN: 4.10.1
(cherry picked from commit e4ef2f072336a59039b1372266e4a5ab05d29cc0)
2013-02-12 21:15:37 +01:00
Thomas Lübking
b71d686a19 fix ElectricBorder[no S] kcfg
REVIEW: 108880
2013-02-12 20:59:47 +01:00
Thomas Lübking
06c725e685 port mouseclick to xcb using a tristrip
REVIEW: 108879
2013-02-12 20:59:47 +01:00
Thomas Lübking
839ac0ddeb fix restacking ... code
- don't cast Window's to pointers for no apparent reason
bug introduced with ac0f8bfb24403168199027a77bba0107bc6d42e1
- no stupid java style iterators, we've stl everywhere
- postfix in a for loop is a bug. period. ;-)

BUG: 313145
REVIEW: 108864
FIXE-IN: 4.10.1
2013-02-12 20:59:46 +01:00
Thomas Lübking
036794e7de restore inputfocus after assigning window shortcut
BUG: 314760
FIXED-IN: 4.10.1
REVIEW: 108887
2013-02-12 20:50:27 +01:00
Script Kiddy
9af0232217 SVN_SILENT made messages (.desktop file) 2013-02-12 19:49:11 +01:00
Martin Gräßlin
2aed7b13d1 Cleanup the Preview rendering of Window Decorations
The preview code still contained all the old logic for embedding the
preview into another widget. Most of the code had been dead for quite
some time.

The only preview rendering code now is the one to render into a pixmap.
This is actually changed to render the widget directly at the right
position obsoleting the previous widget positioning code.

The no preview available label is dropped as it did not get rendered into
the pixmap at all.

Last but not least we fake that compositing is on. This has always been
the case for Aurorae themes and just looks better. Especially on Oxygen I
had always had some corruption when rendering this preview with
compositing disabled.

REVIEW: 108777
2013-02-12 11:51:17 +01:00
Script Kiddy
f63f41de83 SVN_SILENT made messages (.desktop file) 2013-02-12 01:32:38 +01:00
Martin Gräßlin
53028a6d96 Do not use a WeakPointer for LanczosFilter
No need for a WeakPointer as it's just used only in SceneOpenGL2.

REVIEW: 108853
2013-02-11 14:55:41 +01:00
Script Kiddy
1338bc83b2 SVN_SILENT made messages (.desktop file) 2013-02-11 11:27:36 +01:00
Martin Gräßlin
55585514f9 Remove close window mouse action from Present Windows effect
This feature has been superseded by the close window button and as it
is a rather destructive action it makes sense to remove it.

Sorry to everyone who used it.

CCBUG: 314393
REVIEW: 108851
2013-02-11 09:04:06 +01:00
Luca Beltrame
899fc4a5c8 Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts:
	khotkeys/data/kde32b1.khotkeys [differences in translations]
2013-02-09 17:24:34 +01:00
Script Kiddy
084df811d2 SVN_SILENT made messages (.desktop file) 2013-02-09 13:41:29 +01:00
Script Kiddy
c14c152cb5 SVN_SILENT made messages (.desktop file) 2013-02-09 09:05:22 +01:00
Martin Gräßlin
8d2df5dba4 Merge branch 'KDE/4.10' 2013-02-08 14:11:03 +01:00
Martin Gräßlin
2f02157a0f Do not activate InvertEffect per window if there is no active window
BUG: 314593
FIXED-IN: 4.10.1
REVIEW: 108828
2013-02-08 14:08:20 +01:00
Luigi Toscano
9668273441 Merge branch 'KDE/4.10' 2013-02-08 00:28:52 +01:00
Luigi Toscano
ce5e47be5d Extract previously untranslated UI messages.
CCMAIL: kde-i18n-doc@kde.org
CCMAIL: kwin@kde.org
2013-02-08 00:26:48 +01:00
Marco Martin
9bddaea08b Merge branch 'KDE/4.10' 2013-02-07 17:59:07 +01:00
Script Kiddy
685e9368b1 SVN_SILENT made messages (.desktop file) 2013-02-07 13:30:14 +01:00
Martin Gräßlin
4cb4697029 Increase KWIN_EFFECT_API_VERSION_MINOR
ABI change in new screen edge implementation
2013-02-07 11:43:40 +01:00
Martin Gräßlin
10c07080bb Notify effects when the screen gets locked
EffectsHandlerImpl starts to monitor DBus for the screen being locked and
provides this information to the Effect system by allowing them to ask
whether the screen is currently locked and by emitting a signal when the
screen gets locked/unlocked.

This information is needed to ensure that no private data is shown on the
screen. The following effects are adjusted:
* taskbar thumbnails
* thumbnail aside
* mouse mark
* screen shot

BUG: 255712
FIXED-IN: 4.11
REVIEW: 108670
2013-02-07 10:23:30 +01:00
Martin Gräßlin
beb00478e1 Only start animating in cube slide on window move if core uses switch desktop on edge
For this new KWinOptions are exposed to query whether core uses switch on
desktop on move or always.

BUG: 299901
FIXED-IN: 4.11
REVIEW: 108671
2013-02-07 10:10:25 +01:00
Martin Gräßlin
97943019db Use Xcb::Window in WindowBasedEdge
REVIEW: 108513
2013-02-07 10:00:32 +01:00
Martin Gräßlin
90eb2dbf05 Screen Edges may belong to fullscreen windows
Corners are still ours (it's a valid use case to still be able to switch
window through e.g. Present Windows even when running a fullscreen app).

How is it done? An Edge can be blocked and does no longer trigger if it
is blocked. For WindowBasedEdges the edge windows get unmapped in the
blocking case and mapped again when the blocking condition is no longer
valid.

The blocking is so far connected to:
* changes of active window
* changes of fullscreen windows

Whenever one of the events occurs it is checked whether there is:
1. an active client
2. it is fullscreen
3. on the same screen as the edge

If this is the case the edge will be blocked, otherwise unblocked.

BUG: 271607
FIXED-IN: 4.11
2013-02-07 09:48:09 +01:00
Martin Gräßlin
06895db1a9 New Glow on approaching Screen Edge Effect
Feature stolen from hidden Plasma Panel now available for all edges on
approach by mouse.
2013-02-07 09:48:09 +01:00
Martin Gräßlin
bed85baf6c Split out event handling in ScreenEdges in separate methods
Allows to also support xcb_generic_event_t in addition to XEvent.
2013-02-07 09:48:09 +01:00
Martin Gräßlin
9bab40d995 Notifications when approaching a screen edge
For each edge an additional "approach" area window is created. When the
mouse enters this approach window, it gets unmapped and a mouse polling
interval is started. If the mouse leaves the approach area again, the
window gets mapped again and the mouse polling is stopped.

During the approaching a signal is emitted with a factor in [0.0,1.0] to
describe how close the mouse is to the edge. 0.0 means far away, 1.0
means triggering the edge. This signal is passed to the effects to allow
using this information. E.g. to provide a glow corner effect or to make
use of it in the cube animation effect to start the animation on desktop
switch.
2013-02-07 09:48:09 +01:00
Martin Gräßlin
a8539ff54e Turn ScreenEdges into a Singleton
In fact it already used to be a Singleton as there is just one object
hold by the Singleton Workspace. So let's make it a proper Singleton
following our kind of standard approach of having a ::create factory
method called from Workspace ctor and a ::self to get to the singleton
instance.
2013-02-07 09:46:52 +01:00
Martin Gräßlin
7a7f9d1a34 Change the way how screen edges interact with Effects/Scripts
The main difference is that the activation of an edge is no longer
broadcasted to all effects and scripts, but instead a passed in slot of
the Effect/Script is invoked.

For this the EffectsHandler API is changed to take the Effect as an
argument to (un)reserveElectricBorder. As callback slot the existing
borderActivated is used.

In addition the ScreenEdge monitors the object for beeing destroyed and
unregisters the the edge automatically. This removes the need from the
Effect to call unregister in the dtor.

BUG: 309695
FIXED-IN: 4.11
2013-02-07 09:46:52 +01:00
Martin Gräßlin
d9aedf620b Rewrite of KWin's Screen Edge Handling
This rewrite is mostly motivated by the need to handle multi screen
setups correctly. That is have edges per screen and not for the combined
geometry. Also porting from XLib to XCB has been a motivation for the
rewrite.

The design of the new ScreenEdge handling is described in the
documentation of ScreenEdges in screenedge.h.

In addition the following changes have been performed:
* move configuration from Options to ScreenEdge
* add screen edge information to Workspace::supportInformation (obviously
  replaces what had been read from Options)
* have Workspace hold a pointer to ScreenEdges instead of an object
* forward declaration of ScreenEdges in workspaces.h, this explains the
  seemingly unrelated changes of just another include in some files

BUG: 290887
FIXED-IN: 4.11
2013-02-07 09:46:52 +01:00
Martin Gräßlin
6ade1f3ca5 Do not update screen edges when compositing settings changes
The comment says it all: update all settings which can be done through
the compositing KCM. Years ago screen edges was in the composite KCM, but
it no longer is. So there is no need to update the edges when the
compositing settings changes.
2013-02-07 09:46:51 +01:00
Martin Gräßlin
4c0f9f8bbd Remove interaction of quick tiling with ScreenEdges
Quick tiling/maximizing of Clients is completely independent of the
screen edges functionality. That is it determines the borders itself.
Nevertheless there has been some code still around which interacted with
the screen edges each time a window was moved. This code is completely
useless.
2013-02-07 09:46:51 +01:00