Commit graph

9904 commits

Author SHA1 Message Date
Martin Gräßlin
ed4bd2dd5b Suppress animation in Aurorae on creation
Introducing a global animate flag which will be set to enabled once the
Component completed and all border values, etc. are set.
2013-01-23 07:37:25 +01:00
Martin Gräßlin
99e39c8654 Introduce a dedicated borders element in Aurorae
The Borders element provides the four properties:
* left
* right
* top
* bottom

And is used directly in Decoration for all the different kind of settings
following this pattern:
* normal borders
* maximized borders
* padding
* extended borders

These properties replace the existing used borderLeft & co. This makes
the code in the C++ side easier as the various border elements can now be
read with a shared implementation.

The Borders provide some convenient methods to set the sizes of the
borders. E.g. it's possible to just set the side borders to a specific
value. This should simplify the implementation of the no-side-borders
feature in new decoration.

The aurorae qml and plastik are adjusted to use the new way. Existing
3rd party decorations would break, but there's a good reason why there's
no documentation for QML based decorations ;-)

REVIEW: 108436
2013-01-23 07:36:41 +01:00
Script Kiddy
7245237062 SVN_SILENT made messages (.desktop file) 2013-01-22 16:17:03 +01:00
Martin Gräßlin
f2028efe91 Fix another compile error with Extensions hidden in an assert 2013-01-22 14:01:35 +01:00
Marco Martin
240dd25d8d Merge branch 'KDE/4.10'
Conflicts:
	plasma/generic/applets/lock_logout/metadata.desktop
2013-01-22 13:20:13 +01:00
Martin Gräßlin
c2943c63a5 Port KWin::errorMessage to new Xcb::Extensions
Code section had been in an #ifndef NDEBUG which is the reason why I did
not find the usage of Extensions there and why it always compiled
successfully.

Some data elements which got dropped needed to be added again like a name
for the extension and errorBase, etc.

Sorry for the inconvenience of a semi-broken master.
2013-01-22 13:17:07 +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
Martin Gräßlin
819b474a79 Introduce property "visible" on EffectWindow
This property can be used to check whether a window is currently visible
to the user, that is:
* not minimized
* on the current desktop
* on current activity

This is a common need for various effects.

REVIEW: 108341
2013-01-21 15:56:58 +01:00
Script Kiddy
763a953d4a SVN_SILENT made messages (.desktop file) 2013-01-21 12:47:21 +01:00
Script Kiddy
2781f240b6 SVN_SILENT made messages (.desktop file) 2013-01-21 08:20:27 +01:00
Script Kiddy
26a316d044 SVN_SILENT made messages (.desktop file) 2013-01-20 11:57:59 +01:00
Script Kiddy
eb22a0ea1c SVN_SILENT made messages (.desktop file) 2013-01-20 07:52:28 +01:00
Script Kiddy
61e92cf442 SVN_SILENT made messages (.desktop file) 2013-01-18 12:35:32 +01:00
Script Kiddy
96f88dda18 SVN_SILENT made messages (.desktop file) 2013-01-18 08:08:47 +01:00
Script Kiddy
589ed300d1 SVN_SILENT made messages (.desktop file) 2013-01-17 12:53:52 +01:00
Martin Gräßlin
debb71285f Support arrays in callDBus method of KWin Scripting
Thanks to Jan Palus for providing the patch.

BUG: 311896
FIXED-IN: 4.10
2013-01-17 09:30:09 +01:00
Script Kiddy
8154d50dec SVN_SILENT made messages (.desktop file) 2013-01-17 08:15:16 +01:00
Aaron Seigo
de008fe200 Merge branch 'KDE/4.10' 2013-01-16 16:17:20 +01:00
Script Kiddy
3cddfdecff SVN_SILENT made messages (.desktop file) 2013-01-16 12:37:47 +01:00
Script Kiddy
f49ad23e8a SVN_SILENT made messages (.desktop file) 2013-01-16 08:25:39 +01:00
Martin Gräßlin
6b790c1608 Fix incorrect enum name
Sorry for breaking compilation of master...
2013-01-15 15:18:56 +01:00
Martin Gräßlin
6acae45205 Support for new decoration border sizes BorderNoSides and BorderNone
BorderNoSides is what is known from Oxygen as "No Side Borders". The name
should indicate that there is only a border at the bottom. BorderNone is
a mode with no borders at all.

The new enums are added to KDecoration and the KCM so that all decos can
make use of it.

Aurorae is adjusted to support the new sizes for QML themes (it breaks
the old svg based themes) and Plastik makes use of it, by rendering a
one-pixel border around the window, which illustrates that it's still up
to the decoration to decide how to make use of the setting.

REVIEW: 108164
2013-01-15 15:07:22 +01:00
Martin Gräßlin
b7f06b8708 Use window size for offscreen texture size in screenshot effect
Effect used the display size which caused windows being larger than
either width or height not to be captured correctly.

Now it uses the window size for the offscreen texture which also requires
to adjust the modelviewprojection matrix.

As an unrelated change the pointer to GLRenderTarget and GLTexture are
changed to a QScopedPointer and some variables which got moved around
are consted.

BUG: 312851
FIXED-IN: 4.11
REVIEW: 108258
2013-01-15 15:05:43 +01:00
Martin Gräßlin
5f4935fc66 Merge branch 'KDE/4.10'
Conflicts:
	kwin/workspace.cpp
2013-01-14 15:43:01 +01:00
Martin Gräßlin
412afa3dcd Remove asserts from Compositor and wrap Toplevel::compositing() around Workspace::compositing()
BUG: 312712
FIXED-IN: 4.10
REVIEW: 108321
2013-01-14 15:41:08 +01:00
Martin Gräßlin
a1c76f4df2 Gather support information about screens
Adds a section about screens to supportInformation containing:
* whether multi-head is used
* in case of multi-head the screen number
* the number of screens
* geometry per screen

That should hopefully end the two often asked questions about the user's
screen setup, especially if they say they use multi-head.

REVIEW: 108363
2013-01-14 15:39:05 +01:00
Script Kiddy
88f998a924 SVN_SILENT made messages (.desktop file) 2013-01-14 12:46:29 +01:00
Casian Andrei
7a6e48ef3b Fix premultiplied alpha issue with color correction
When correcting a color that was with premultiplied alpha, the alpha
value was not multiplied back again as a final step. This was breaking
color correction when the blend function was GL_ONE,
GL_ONE_MINUS_SRC_ALPHA. The blend function was changed for normal
windows (a workaround), but not for effect frames, i.e. the effect
frames were broken with color correction enabled.

Removes the blend function workaround.

Removes a useless setupForOutput.

BUG: 311319
REVIEW: 108189
2013-01-13 19:10:54 +02:00
Casian Andrei
df034c16ad Abort color correction initialization and disable it in case of errors
Checks are now performed for GL errors and in case of errors everything
is aborted. The error handling mechanism introduced for this purpose
somewhat improves the color correction code.

Fix gl invalid operation in color correction, when first setting up the
lookup texture uniform.

REVIEW: 107754
2013-01-13 19:10:54 +02:00
Script Kiddy
0e73ee70a4 SVN_SILENT made messages (.desktop file) 2013-01-13 12:19:08 +01:00
Chusslove Illich (Часлав Илић)
52a4115a9e i18n: contexts. 2013-01-13 10:56:07 +01:00
Script Kiddy
e22b539e3a SVN_SILENT made messages (.desktop file) 2013-01-13 08:07:12 +01:00
Weng Xuetian
b0887fe0cf Merge remote-tracking branch 'origin/KDE/4.10' 2013-01-12 09:39:06 -05:00
Script Kiddy
537cd85eff SVN_SILENT made messages (.desktop file) 2013-01-12 13:13:12 +01:00
Martin Gräßlin
0168e8f2c1 Add documentation for global KWin object in KWin scripting 2013-01-11 18:12:25 +01:00
Grégory Coutant
e005e18a0f Add ability to disable multihead support
REVIEW: 107735
2013-01-11 09:37:19 +01:00
Martin Gräßlin
51ce05e445 Use a more sane default for delay focus and autoraise in FFM
At the same time ensuring that KCM and KWin::Options use the same value.
Should be ported to KConfigXT some day.

REVIEW: 108288
2013-01-11 08:57:42 +01:00
Martin Gräßlin
47da2464f3 Merge branch 'KDE/4.10' 2013-01-11 08:52:42 +01:00
Martin Gräßlin
524a63b3fe Track painted areas in Thumbnail Aside effect
Following the approach of ShowPaint effect by tracking the actual painted
regions per window to determine whether the painted area intersects with
one of the thumbnails.

BUG: 306169
FIXED-IN: 4.10
REVIEW: 108289
2013-01-11 08:51:20 +01:00
Martin Gräßlin
e654c9d106 Do not clip away shadows in SlidingPopupsEffect
Animation now completely based on the expandedGeometry which includes the
shadows and another repaint at the end of the animation is added to
ensure that there are no leftover shadows.

BUG: 312168
FIXED-IN: 4.10
REVIEW: 108255
2013-01-11 08:50:15 +01:00
Martin Gräßlin
5ccd4f2db8 Adding version information to supportInformation
* KWin version as defined by KDE4WORKSPACE_VERSION
* KDE SC version (compile)
* KDE SC version (runtime)
* Qt version (runtime)

REVIEW: 108320
2013-01-11 08:49:25 +01:00
Martin Gräßlin
b5ed419ec6 Remove all Q_WS_X11 ifdefs
Not sure why some KCMs used the define, but complete KWin is not compiled
for WIN32 and the define is useless in Qt 5 anyway.

REVIEW: 108319
2013-01-11 08:35:47 +01:00
Script Kiddy
3035d220c0 SVN_SILENT made messages (.desktop file) 2013-01-11 08:17:14 +01:00
Weng Xuetian
0a699cf8ce Merge remote-tracking branch 'origin/KDE/4.10' 2013-01-10 13:19:04 -05:00
Script Kiddy
d5a0dd56cf SVN_SILENT made messages (.desktop file) 2013-01-10 12:23:23 +01:00
Weng Xuetian
d24ed172cb Merge remote-tracking branch 'origin/KDE/4.10' 2013-01-10 03:04:28 -05:00
Weng Xuetian
e17303af99 forgot to add new file. 2013-01-10 03:02:39 -05:00
Weng Xuetian
5b7a30aeac use qml and svg to drag shadow in tabbox
due to plasma change, shadow is not included by default, hence kwin
tabbox need to handle shadow by itself, and due to kwin is compositor
and have shadow as effects, it's not a good idea to use X property to
pass shadow from kwin to X and to kwin. This change use the old way to
draw shadow side the tabbox, and partly move the blur region setting to
qml.

REVIEW: 108243
2013-01-10 02:55:08 -05:00
Martin Gräßlin
80bd289e06 Better names for global shortcuts in Zoom Effect
BUG: 288903
FIXED-IN: 4.11
REVIEW: 108290
2013-01-10 08:28:30 +01:00