the (old) button effect windows used to be unreferenced
with the re-invocation of the effect. because we stopped
deleting/recreating the window, this approach failed and
the effect window was never deleted.
Unreferencing the window at proper occasion (see new hide
location) coked up - guess what - the exact same "texture is
junk" issue as for the QtQuick close button in present windows...
So we resort to the exact same stupid "hide by moving" solution
as we have there.
BUG: 348577
FIXED-IN: 5.4
REVIEW: 124136
Without the componentDisplayName the shortcut dialog takes the name of
the application e.g. Systemsettings or "KDE Control Module", but we want
it to be KWin.
REVIEW: 124706
If the user has only maximized windows or all
windows crammed into one region of the screen
the effect would not resemble an aperture at all
this ensures a maximum amount of corners is used
while seeking to still use shortest paths
BUG: 348709
FIXED-IN: 5.4
a) close to pointless
b) the target resolution texture is invalid if the resize effect is enabled (as the window was not actually resized)
REVIEW: 123901
transformed screens prevent hardware clipping
leading through filtering subquads
This requires to subquad in the painting pass
what is not supported for non rectangular
qauds ands presently aborts (in debug builds)
if any quad is transformed (as by eg. the wobbling)
REVIEW: 123733
BUG: 338972
Same issue as with present windows closers: qml is slow
Interestingly "hide" means "hide" here and there're also
no visual artifacts.
BUG: 347339
REVIEW: 123668
transformed screens prevent hardware clipping
leading through filtering subquads
This requires to subquad in the painting pass
what is not supported for non rectangular
qauds ands presently aborts (in debug builds)
if any quad is transformed (as by eg. the wobbling)
REVIEW: 123733
BUG: 338972
Same issue as with present windows closers: qml is slow
Interestingly "hide" means "hide" here and there're also
no visual artifacts.
BUG: 347339
REVIEW: 123668
This is now crucial, because while before
(the minimized) windows were conditionally
shown, but are now always behind the desktop.
Also, it makes the tabbox more consistent.
BUG: 344083
REVIEW: 122679
The closeview is not hidden because that causes
invalid textures (apparently QML related) and
deleting/recreating causes massive I/O overhead
on effect invocation.
As last resort, the window is "hidden" by moving
it out of the root window geometry.
Jonathan, please RESPIN kwin - sorry for the trouble
... again.
BUG: 345159
REVIEW: 123035
CC: riddell@gmail.com
Moves calculation of projection and modelview matrix
(aligned to new scene_opengl code) to effect start,
caches the matrices in private members and sets them
on WindowPaintData
BUG: 343509
REVIEW: 122355
FIXED-IN: 5.3
This change allows to include the effect_builtins.cpp into the build of
e.g. a kcm without having to link against all effects.
The use case for this is when one needs to resolve just the name of an
effect without wanting to hard code the name.
This is a kind of workaround for the flicker of fading out windows.
When a window is faded out it is a deleted and can by that be used
as a sufficient solution to work around the problem.
BUG: 307112
FIXED-IN: 5.2.0
REVIEW: 121909
Prior to this commit we didn't know if mipmaps were going to be used
when we created the GL texture, which meant that we couldn't tell the
driver whether to allocate storage for mipmaps or not.
This resulted in one of two things happening depending on the driver;
either it would allocate storage for mipmaps that in most cases would
never be used, or it wouldn't and would later be forced to reallocate
the texture when mipmaps were added.
By adding this parameter we can now explicitly tell the driver how
many mipmap levels will be used.
The parameter is only added to the non-image constructor for now. The
image constructor is changed to only allocate a single level, which
matches how textures created from images are used in kwin. This may
need to be revisited in the future.
This code is broken in a number of different ways; firstly by assuming
that the mipmaps need to be regenerated when the texture filter has
changed. Secondly by preventing mipmaps from being specified by other
means.
This commit removes the code from bind() and adds a generateMipmaps()
method instead.
The cube effect was relying on paintWindow() using the generic shader
without explicitly telling it to do so. This makes the cube effect
work with dynamic shaders.
Instead of getting size from displayWidth() and displayHeight() use
the information we have from Screens. This means there is only one
place to have the information and by that we can ensure that all
components use the same data to rely on. displayWidth/displayHeight
seem to provide the wrong information when unplugging an output
without disabling the output. This results in rendering artefacts.
But KWin::Screens has the correct information available.
On MacBooks the "Exposé" button is on XF86LaunchA. Let's use it
for activating Present Windows (ALL) as an alternative shortcut.
For non-macbook users this doesn't hurt, for MacBook users it's a
nice touch to have the key working as indicated by the pictogram.
Yes, it's realy Key_LaunchC:
"On X11 this key is mapped to XF86XK_LaunchA key for legacy reasons."
REVIEW: 118721
Scripts and scripted effects can provide a ui file which gets loaded at
runtime. Obviously such a ui file is not translated. This introduces
quite a hack to load the translated strings.
In the metadata.desktop file the scripted component can provide a key
X-KWin-Config-TranslationDomain. The genericscriptedconfig tries to
locate the metadata.desktop file and reads this entry. If it is present
we extract all string properties of the loaded UI and pass them through
ki18nd.
REVIEW: 118585
geometryChanged is always executed before maximizeChanged, so we
store the last changed geometry (through regular resize - the current
geometry) and the second last one (used exclusively so far) which is
the old geometry we want to use if the geometry change was caused
by the maximize change
CCBUG: 335023
Forward port of 3c8506992d3a05daa3f0752cc0f5e844acf2a8e2 from kde-workspace
DesktopGrid uses PresentWindows Effect as a proxy effect. Instead of
hard coding the name of the Effect let's use the name resolving provided
by BuiltInEffects.
xcbutils.h has quite a few inline only implementations such as Xcb::Atom,
the Wrappers, Xcb::Window and the convenient methods. Thus there is
nothing wrong with using it from the built-in Effects.
Xcb::Atom is used in Glide and Logout Effect to get the atom. To keep the
logic of the existing code it got extended by a bool isValid() which
gets the reply and returns true if the atom is set.
REVIEW: 117587
This removes all the hacks to add kwin4_effect_ to the name of the Effect
and adjusts the desktop files of the effect configuration's parent
component.
Note: the scripted effects still start with kwin4_effect_ prefix.
REVIEW: 117367
All KCMs and KWin core use the BuiltInEffects namespace to find and
interact with the effects. There is no information left in the desktop
file which are of usage. Thus they can be removed.
The EffectData in BuiltinEffects is extended by all the data needed for
the desktop effects KCM:
* display name
* comment
* category
* video-url
* exclusive group
* internal
This information is taken directly from the desktop files.
The Built-in effects are now also resolved through the BuiltInEffects
namespace and the KServiceTypeTrader query is adjusted to only find the
scripted effects.
Unfortunately this introduces another round of adding "kwin4_effect_" to
load and save the effects correctly. This will be removed once all KCMs
are adjusted to use the new BuiltInEffects.
Instead of having several hashes with data about the built-in effect,
we use a struct EffectData which contains the name, the enabled by
default state and function pointers to create, supported and check
enabled by default. There is one static vector with all the data
specified which is ordered by the BuiltInEffect enum. Thus an enum value
can be used as an index to the data.
In addition it's no longer resolved around QByteArray, but uses QString.
REVIEW: 117354