Commit graph

11257 commits

Author SHA1 Message Date
Thomas Lübking
22f0e62cb8 Merge branch 'KDE/4.11' 2013-09-26 19:44:35 +02:00
Thomas Lübking
11f5f0298d workaround bug #321897 by multiplying fadeout time
with 4 instead of just altering the default value
It seems the value is actually written for some ppl.

Worse: former patch didn't actually work as expected
anymore

CCBUG: 321897
2013-09-26 19:43:10 +02:00
Martin Gräßlin
c2aacca735 Ensure that our compositing context is current when starting to render
With QtQuick2 KWin is no longer the only one having an OpenGL context
thus we need to ensure that our context is current. If not it results in
highly interesting crashes when our code is executed on the QtQuick
context.

The context is made current before we swap and before we start to render
a frame. During rendering a frame it's not made current again based on
the assumption that while we render there is no interference. If this
assumption doesn't hold, we need a more sophisticated solution at the
moment it seems to fix the crashes.
2013-09-26 11:13:40 +02:00
Martin Gräßlin
080113e04c Introduce a new backtab test handling in TabBox invokation
Our back shortcut is registered as Alt+Shift+Backtab but our converted
Qt key coming into the test method is Alt+Shift+Tab. The logic so far
made this always fire for the normal Alt+Tab shortcut as at some point
the Shift modifier gets removed to do the test.

To handle it properly we first have to extract all the modifiers to just
get the key. If the key is Tab, we replace it with Backtab, combine it
with the extracted mods so it will be Alt+Shift+Backtab which matches
the registered shortcut.

The existing backtab solution can probably be removed and is clearly
wrong as it uses the keys as flags which they aren't.
2013-09-26 09:50:27 +02:00
Martin Gräßlin
e448a4bfc1 Merge branch 'KDE/4.11'
Conflicts:
	kwin/main.cpp
2013-09-26 07:54:51 +02:00
Thomas Lübking
61f1bcc991 Revert "Add ability to disable multihead support"
The variable is set not from config nor anywhere else when kwin is
started through ksmserver by startkde.

In addition the KGlobal implementation is twisted compared to the kcminit
config behavior (the config value defaults to true, not false - ie. if the
variable isn't set (by kcm init) it's reasonable to assume true either.

Therefore and in alignment with PW/2, the environment is read directly and
on absence resolved to "true".

To control the behavior, please export KDE_MULTIHEAD=true/false before starting KWin
(eg. in /usr/bin/startkde)

This reverts commit ab6d5c048a25bcb2f5bdb822ba3eda64019c61bc.

REVIEW: 112579
CCBUG: 256242
2013-09-26 07:52:47 +02:00
Thomas Lübking
3594550b14 Merge branch 'KDE/4.11'
Conflicts:
	kwin/eglonxbackend.cpp
	kwin/glxbackend.cpp
2013-09-25 23:21:36 +02:00
Thomas Lübking
e63e5f5712 fix scheduling the repaints
repaints caused by effects so far polluted the timing calculations
since they started the timer on the old vsync offset
This (together with undercut timing) lead to multiple frames in
the buffer queue, and ultimately to a blocking swap

For unsynced painting, it simply caused wrong timings - leading to
"well, kinda around 60Hz - could be 75 as just well".

REVIEW: 112368
CCBUG: 322060
that part is fixed in 4.11.2
2013-09-25 23:09:18 +02:00
Thomas Lübking
cb88bc8848 keepInArea, client geometry containment condition
Since windows can place the decoration outside the screen
this needs to be still a valid condition when checking
whether we've to keep in area

In addition: calculate tx, ty and perform one move call
(include rule check and XMoveWindow unless there's a geometry
blocker ...)

BUG: 324792
FIXED-IN: 4.11.2
REVIEW: 112805
2013-09-25 23:09:18 +02:00
Thomas Lübking
4c170a2fdb snap to deco, not client on inner screen borders
client snapping is ultimately reasoned by fitt's law
and inner borders are not infinite

BUG: 323504
FIXED-IN: 4.11
REVIEW: 112103
2013-09-25 23:09:17 +02:00
Thomas Lübking
06b482f725 pack to client, not deco
this makes packing following the snapping behavior

REVIEW: 112807
2013-09-25 23:09:08 +02:00
Thomas Lübking
c6580ce696 add int Screens::intersecting(QRect)
REVIEW: 112910
2013-09-25 21:38:17 +02:00
Martin Gräßlin
67590e7240 Use KF5::KInterProcessWindowing in target_link_libraries
Seems to have changed in frameworks. Unbreaks the build.
2013-09-25 10:18:06 +02:00
Martin Gräßlin
255140291f Only compare to last screenedge trigger time when triggered at least once
Greetings from the "wtf, how could that have ever worked" department.
This fixes the screenedge activation on Qt 5. The last trigger time is
only set after an activation so before activation it is invalid thus the
comparison to any value doesn't make sense.
2013-09-25 09:44:48 +02:00
Martin Gräßlin
be3a0cf4ca Fix reading of window properties from effects
That's what you get for changing code you cannot properly test. The
calculation was completely messed up. Now reads the correct byte size
for the byte array. In addition the usages in the effects are improved
to cast the data into the proper uint32_t values instead of the more
generic long. After all if the format is 32, the length is 32 and not
a long.
2013-09-25 09:12:31 +02:00
Thomas Lübking
feafbca941 Merge branch 'KDE/4.11' 2013-09-24 21:33:46 +02:00
Thomas Lübking
05bc5bfc0b extend fadeout animation duration to 600ms
compensated by a QuartOut shape, this keeps the
effect alive while the sheet or similar effects run
without much visual stretch

Covers issue until there's AnimationEffect::determine()

CCBUG: 321897
semi Fixed in 4.11.2
REVIEW: 111798
2013-09-24 21:31:07 +02:00
Thomas Lübking
6303c8d573 sanitize user/fullscreenable condition
whether or not a window is maximizable does really not
matter (it's not if the size is locked, so the
maximized size is the only size) but only if the
window can take the fullscreen geometry.

otoh, the size restrictions (maximum size, fixed aspect)
should be honored by default but still ignorable by rule

BUG: 324733
FIXED-IN: 4.11.2
REVIEW: 112654
2013-09-24 21:30:49 +02:00
Thomas Lübking
79d6c47a46 group aware restack accounts layer compatibility
the restack code stacks under all members of an application
this is a problem if the group contains a keep below or desktop
etc. (while the other window is a normal one) what resulted in
restacking the client "invalidly" above the window of the other
layer but below all other memberso of its own group for no reason

REVIEW: 112627
CCBUG: 110543
2013-09-24 21:29:54 +02:00
Thomas Lübking
51c3c6cc42 no VD change for activation & unreasonable policy
F(S)UM mean "the focus is where the mouse is"
the mouse is not on the other virtual desktop
(and it was even granted regardless of the actual geometry/position)

The "unreasonable" focus policies expose an issue about
the present linked handling of "allow activation" and
"allow raising" (see https://git.reviewboard.kde.org/r/110919/ )

Activation would match "extreme" (if the window maps on the same
virtual desktop, half a mile away from the mouse, it won't
receive the focus) but not regarding raising (which is actually
an issue entirely different from FSP)

REVIEW: 112585
CCBUG: 80897
2013-09-24 21:23:36 +02:00
Martin Gräßlin
cf6d6e0515 Re-enable threaded query for effects
KConfig should be thread safe in KF5.
2013-09-24 14:32:21 +02:00
Martin Gräßlin
cebb4b86b5 Use new for-loop instead of foreach in kwin/effects.cpp
kdevelop was causing parsing errors, so I had to do it ;-)
2013-09-24 14:31:35 +02:00
Anselmo L. S. Melo
d258759ac9 Port from KTemporaryFile to QTemporaryFile
REVIEW: 112742
2013-09-24 08:07:41 -03:00
Martin Gräßlin
a3e1635ba6 Port kwin/genericscriptedconfig from Plasma::ConfigLoader to KConfigLoader 2013-09-24 12:37:25 +02:00
Martin Gräßlin
969e6b85e7 Merge branch 'master' into frameworks-scratch
Conflicts:
	CMakeLists.txt
	kwin/client.cpp
	kwin/effects/highlightwindow/highlightwindow.cpp
	kwin/libkwineffects/kwingltexture.cpp
	kwin/libkwineffects/kwinxrenderutils.cpp
	kwin/scene_opengl.cpp
	kwin/workspace.cpp
	plasma/desktop/applets/kickoff/CMakeLists.txt
	plasma/desktop/applets/taskmanager/package/contents/code/tools.js
	plasma/desktop/applets/taskmanager/package/contents/ui/Task.qml
	plasma/desktop/applets/taskmanager/package/contents/ui/main.qml
	plasma/desktop/applets/taskmanager/package/metadata.desktop
	plasma/desktop/applets/taskmanager/plugin/textlabel.h
	plasma/desktop/applets/tasks/CMakeLists.txt
	plasma/desktop/applets/tasks/package/metadata.desktop
	plasma/desktop/applets/tasks/tasks.cpp
	plasma/desktop/toolboxes/plasma-toolbox-desktoptoolbox.desktop
	plasma/generic/applets/activitybar/activitybar.cpp
	plasma/generic/wallpapers/color/plasma-wallpaper-color.desktop
	plasma/generic/wallpapers/image/plasma-wallpaper-image.desktop
2013-09-24 11:28:38 +02:00
Thomas Lübking
6f61723cee Merge branch 'KDE/4.11' 2013-09-24 00:52:39 +02:00
Thomas Lübking
3eb0b27d00 windowgeometry effect, keep hint inside screen
and use passed geometry parameter to position the labels
(required with resize effect because the actual geometry is
not updated)

REVIEW: 112849
2013-09-24 00:50:55 +02:00
Thomas Lübking
3f5ef10c8e introduce GLTexture::clear and use it from paintredirector
also work around broken fbo texture clearing on fglrx

so far supports FBO/glClear and resorts to glTexSubImage2D

if the fbo cannot be created or is (in case of fglrx)
known to break, resort to glTexImage2D loading of an
argb array of zeros

BUG: 323065
FIXED-IN: 4.11.2
REVIEW: 112526
2013-09-24 00:50:55 +02:00
Thomas Lübking
4fd554a2e2 fix xcb CurrentInput implementation
broke on interim Wrapper() constructor change

The Constructor needs to explicitly pass
XCB_WINDOW_NONE to the inherited Constructor to
trigger a request

Thanks to Alex Leach for finding this

CCBUG: 256242
FIXED-IN: 4.11.2
REVIEW: 112595
2013-09-24 00:50:55 +02:00
Thomas Lübking
67cb571f86 fix two damage artifact causes
1. when adding a full damange, that must not replace existing (larger) repaints
2. emit geometryChanged before invoking and to update shadowGeometry through addRepaintFull

BUG: 324560
FIXED-IN: 4.11.2
2013-09-24 00:50:54 +02:00
Thomas Lübking
149e97fcb9 reset invert shader on viewport resize
General problem known from bug #325154

BUG: 325154
FXED-IN: 4.11.2
REVIEW: 112877
2013-09-24 00:50:54 +02:00
Thomas Lübking
66ffd9f0f6 input window: ensure input shaping is supported
BUG: 320459
FIXED-IN: 4.11.2
REVIEW: 112623
2013-09-24 00:50:54 +02:00
Martin Gräßlin
2694065133 Merge branch 'KDE/4.11' 2013-09-23 19:57:57 +02:00
l10n daemon script
a0be69adde SVN_SILENT made messages (.desktop file) 2013-09-23 04:08:07 +00:00
l10n daemon script
7c09fb5af2 SVN_SILENT made messages (.desktop file) 2013-09-21 06:50:39 +00:00
l10n daemon script
68995c9ba5 SVN_SILENT made messages (.desktop file) 2013-09-21 04:07:24 +00:00
Antonio Larrosa
f9109a3d4b Make kwin not crash under qemu due to failing glx call
This fixes a kwin crash that happened under qemu when running kwin for
the first time (subsequent runs had glx already disabled)
2013-09-17 19:06:40 +02:00
Antonio Larrosa
48057b33a8 Make kwin not crash under qemu due to failing glx call
This fixes a kwin crash that happened under qemu when running kwin for
the first time (subsequent runs had glx already disabled)
2013-09-17 18:07:17 +02:00
Martin Gräßlin
ad24a019ab Add override to methods in (Root|Win)Info
The methods in the parent class might need to be changed (XLib
data types). So getting a compile error after the change would be
nice.
2013-09-17 08:17:40 +02:00
Alex Richardson
898e3f625a create a variable and not a function declaration
found with the clang -Wvexing-parse warning
2013-09-13 16:52:25 +02:00
Alex Richardson
109c504ef7 fix mismatched struct/class forward declaration
Found by compiling with clang
2013-09-13 16:52:25 +02:00
Martin Gräßlin
e553d2869d Move the decoration window back to the padding position after each resize
Behavior seems to have changed in Qt 5. Without doing the move the deco
has a wrong position and all mouse interaction is broken after the first
resize.

And with this change Oxygen windeco in compositing is fully functional!
2013-09-13 13:56:09 +02:00
Martin Gräßlin
210e1e970b Add override to all methods in KWin::Bridge
Compile errors if we forget to change the Bridge are a nice thing.
2013-09-13 10:39:24 +02:00
Martin Gräßlin
e71c921ad2 Add Qt::WindowDoesNotAcceptFocus to our initial window flags on deco
Qt requests focus on a mouse press event on the QWindow of a QWidget.
This results in our active window losing focus when a mouse press on
the window decoration happens.

Of course we don't need Qt to request focus on the window decoration.
If it's the inactive window we will activate it by ourself. If it's
the active window, well it's already active.

Adding Qt::WindowDoesNotAcceptFocus to the initial window flags
ensures that this behavior in Qt gets disables with the result that
the window no longer loses focus on mouse click on decoration.

I declare this to be the most difficult one line change in my life.
2013-09-13 10:13:21 +02:00
Martin Gräßlin
eeb095f1e7 Use Qt::WindowFlags also in the bridge
Adjustment to change in KDecorationBridge.
2013-09-13 10:12:28 +02:00
Martin Gräßlin
5eb69aba9c Switch to XCB_BUTTON_INDEX* for Pointer Button constants 2013-09-13 09:12:26 +02:00
Martin Gräßlin
85152773fc Fix wrong enum
Why do they have to sound so similar?
2013-09-13 09:11:10 +02:00
Martin Gräßlin
2944e919da Introduce d-ptr class for KCommonDecoration 2013-09-12 09:27:39 +02:00
Martin Gräßlin
169beb6b1f Add d-ptr class for KCommonDecorationButton
All private members are moved to the new d-ptr class.
2013-09-12 09:27:39 +02:00
Martin Gräßlin
fcfcc795e6 Change KDecorationFactory::options()
* no longer inlined
* forwards to KDecorationOptions::self()
* deprecated
* protected
2013-09-12 09:27:39 +02:00