This simplifies how the stream resolution is updated and removes a couple
more of failure points. This also appears to fix window screencasts freezing
in obs when those windows are resized.
The existing check incorrectly compares the directory path only. This
allows unintended GPUs to be added when events occur for them, such
as with "udevadm trigger".
Update the check to use the full path.
This moves some of the responsbilities up in the stack, which simplifies
the backends and opens up some future possibilities like making direct scanout
work for non-surface items
ScreenCastStream::onStreamAddBuffer() can be called before the stream
params are updated. This is problematic because that function expects a
valid m_dmabufParams.
The reason why m_dmabufParams is reset is to force the onStreamParamChanged()
function to check whether dmabufs can be still allocated with the new size.
Also pull "Rows" out of the SpinBox into a dedicated label.
Both to address concerns "Add" about being misinterpreted as
"Add Row", given that the button to add a new virtual desktop
now sits right next to the row count spinner.
The steady clock is more preferred for generating timestamps because it
ensures that timestamps increase monotonically.
This fixes screencasts freezing in obs after changing the system time.
If the max framerate is 60Hz, currently, the frameInterval is going to
be 16.6ms. On the other hand, lastSentAgo is likely to be just 16ms. So
the frame throttling timer will be started just to wait less than a
millisecond.
Hidden moveResize() calls stand in the way of making geometry code
reusable or more refactorable. They also usually require one using
geometry update blockers, which are just a horrible concept because
they make geometry code unnecessarily more complex and add more failure
points.
The existing code overwrites all per-output data with the config from KScreen
every time an output config is found that isn't in the KWin data base yet.
That causes problems like the scale being reset to 1.0 if the user logged
into Xorg before, or resetting it to whatever scale KScreen had saved on
Wayland, which isn't much better.
Instead of doing that, use the KScreen config as inspiration for some specific
output settings, instead of copying it outright. It's not ideal, but it's
better than overwriting settings the user has explicitly set up
BUG: 485353
We don't need a pixmap for direct scanout, and the drm backend destroys the pixmap
when direct scanout is successful... so this check created a loop of direct scanout
working and not working, and worse, the client reallocating its buffers each time.
BUG: 485639
BUG: 485730
BUG: 485712
CCBUG: 477016
SyncTimeline::moveInto imports the provided fence to the syncobj by
calling drmSyncobjImportSyncFile. However, that function assumes the
syncobj a binary syncobj, meaning the fence will be imported at timeline
point 0, not at the intended timeline point.
Since there is no timeline equivalent of drmSyncobjImportSyncFile, to
achieve the correct behavior we create a temporary binary syncobj,
import the fence into that, and then use drmSyncobjTransfer to transfer
the fence to the desired timeline point on the destination syncobj.
Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Try harder to get some cursor theme loaded, otherwise the cursor is
invisible, which also makes it hard to fix the configuration.
Also add some warnings instead of failing silently.
Workspace already makes sure to only dynamically delete the
dpmsinputeventfilter if all screens are currently on. This line to wake
all screens is therefore redundant.
It's problematic as it can cause a crash on final teardown when
workspace is destroyed.
BUG: 484861
This adds a libeis backend via plugin which supports clients sending
emulated input events. No public listening socket is exposed,
clients are expected to go through the RemoteDesktop portal.
In order to restrict the device types available to clients
according to what was approved via the portal a separate eis
context per portal request is created. The communication with
the portal happens through a simple dbus interface where cookies
are handed out for each eis context so the portal can inform KWin
when the portal session is closed/should end.
The quicktileMode member now is just for the requested tile mode, base the "real" mode only on m_tile.
The requested tile mode is used for double buffering, to look and behave just like requestedMAximizeMode() which is updated immediately, but needs to acknowledge the configure request and render for quickTileMode() (and the right tile() instanced to be associated) to be updated accordingly
If the metadata of the effect is invalid, loadEffect will complain
rather than failing silently, making debugging issues a bit harder and
it's something that we are already checking for and shouldn't
realistically be happening.
Integrate with colorpicker effect to disable window darkening while
color picker effect is active. Unfortunately, this solution has couple
of limitations:
- active state of effects is not an observable property, so a new
property had to be added to the effects singleton;
- consequently, list of active effects is not an observable property, so
the whole thing could not be implemented in pure QML in the dialog
parent effects;
- actual isActive() state of the color picker for whatever reason
required that m_scheduledPosition is not an invalid point,
effectively making it always inactive except for a brief moment
between addRepaintFull() call and paintScreen() callback. That check
had to be removed.
- QColorDialog windows are still modal and darkened by default;
- QColorDialog on X11 does not use portals/KWin, so this trick does not
apply at all;
- effects->isScreenLocked() which isActive() depends on is not an
observable property either.
BUG: 172921