Callgrind analysis showed that this method has room for improvement.
The bottle neck is mapping the Unmanaged against the list of windows
retreived from xcb_query_tree. The number of windows in that list is
rather large (>1000), which turns the loop into an expensive path.
Workspace::findUnmanaged seems to be too expensive for that due to the
overhead of using a functor and multiple method calls. The Inl. cost
before the optimization for checking ~55,000 windows is 2.46.
The change uses a good old const-iterator based loop over the unmanaged
list to check for the window. This reduces the Incl. cost for checking
~55,000 windows to 0.28.
REVIEW: 122067
Only emit paletteChanged signal and repaint decoration if the palette
actually changed. Even more important: check for path.isEmpty() instead
of path.isNull(). ::isNull() returns false for "" causing a costly
creation for default color scheme.
REVIEW: 122083
The config option got disabled during porting to kdecoration2.
This change re-adds the config option and adds a small config
interface for SVG based themes.
Connecting to the DBus signal emitted on KGlobalAccels by the
cursor kcm and forcing a reload of all cursors. For runtime
config change we need to take the config value and need to ignore
the now outdated environment variables.
REVIEW: 121928
BUG: 325763
FIXED-IN: 5.2.0
The heuristic checks whether there is something which looks like a
tag before the first line break. So let's use a <br> instead of a \n
for the first line break.
BUG: 315282
FIXED-IN: 5.3.0
REVIEW: 122032
If the configured decoration plugin fails to load, we try to load
the default decoration plugin. If that also fails to load, we try
to load Aurorae, which is shipped with KWin, so the chances are
higher that it is available.
Also the checks in Aurorae are improved to fall back to the Plastik
theme if the selected SVG theme is not available.
BUG: 341014
FIXED-IN: 5.2.0
REVIEW: 121859
The feature is pretty much untested as it depends on Qt 5.4 and this
was not a requirement during the development of 5.2. On the other hand
regressions in this feature are very severe as it can freeze the screen
and by that render the system unusable.
This change disables the feature by default. To enable it use the
environment variable KWIN_USE_INTEL_SWAP_EVENT=1.
CCBUG: 342582
REVIEW: 122008
The drawable field is set to the X drawable ID when the swap event is
synthesized by DRI2WireToEvent(), and the GLX drawable ID when the
event is received over the wire. The latter being the case with DRI3.
__glXWireToEvent() fixes this for Xlib clients by changing the field
to the X drawable ID. This doesn't work for xcb clients however,
so we have to expect the field to be set to either the X or the GLX
drawable ID.
BUG: 342582
Mostly a safety check, but fixes a crash with borderless maximized
windows. If that option is set we also do not notify the decoration
at all, as the deco will be destroyed anyway.
BUG: 341675
REVIEW: 121858
When map is called we need to repaint the complete area including
decoration shadows (e.g. might be called after unminimize). Therefore
we use a layer repaint with the visibleRect.
BUG: 342085
REVIEW: 121891
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
it makes no sense and there's a good chance
that in this case m_vbo is still nullptr and
it will not be created since d->m_cachedSize
will be an empty size as well
-> nullptr access -> crash
BUG: 337090
FIXED-IN: 5.2
checkWorkspacePosition() operates on geom_restore
to preserve window positions on temporary
(without moving/resizing the window by the user)
screen layout/geometry changes.
Therefore, in the multiscreen case the
screenbound check must be done towards
the screen the window *would* be on
according to geom_restore, not the one
it is right now.
CCBUG: 161325
REVIEW: 121320
FIXED-IN: 5.2
QFutureWatcher::cancel() might be still processed
(it's another thread) while the inherited ~QObject()
deletes the FutureWatcher
BUG: 327287
REVIEW: 121225
Don't start the composite timer at the end of performPaint() when a
buffer swap is pending and vsync is enabled. Instead set
m_composeAtSwapCompletion to true so performPaint() gets called again
as soon as the swap completes.
This makes the repaint cycle look like this:
scene->paint()
SwapBuffers()
Process events
·
·
Swap completes
Fetch and reset damage (if applicable)
scene->paint()
SwapBuffers()
Process events
·
·
Swap completes
...
This results in a noticeable improvement in animation smoothness with
drivers that support GLX_INTEL_swap_event, since we're now able to
consistently render at the monitor refresh rate.
Use glTexStorage2D() to allocate storage for the texture. The structure
of the resulting texture becomes immutable and the texture is always
mipmap complete. This allows the driver to skip the mipmap consistency
checks when validating the texture at draw time.
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.
GLTexture would set both the minification and magnification filters
to GL_NEAREST if the texture filter was set to any mipmap filter other
than GL_LINEAR_MIPMAP_LINEAR.
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.
Paint is in the middle of the compositor rendering loop. Updating
the shadow at that point breaks KWin. Thus we delay the update to
the next event cycle. Obviously it would be even better to only
update the shadow if it changed, but that might be too expensive.