| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
Unlike the comment this commit removes claims, the info is not the same. When
the monitor settings are "sparse", ie monitor 1 and 3 are enabled, then
Xinerama will report this as a continous range ie monitor 1 and 2 are enabled.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
| |
If a client window is maximized or fullscreen, and we fail to set the config,
the client will keep resending the config (as a result of the attempted
changes + rollback), sending us into a loop until the window gets unmaximized.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Usually XRRSetScreenSize failing simply means that we don't have enough
video memory, out current handling of this has 2 issues:
1) It leaves things in an inconsistent state
2) It sets x11->set_crtc_config_not_functional causing any futher monitor
configs send by the client to get ignored
This patch fixes these issues by:
1) Rolling back all changes made when XRRSetScreenSize fails
2) Not setting x11->set_crtc_config_not_functional on XRRSetScreenSize failure
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
| |
Where it logically belongs, thus turning same_monitor_configs into a
function purely comparing monitor configs.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
| |
And use it in same_monitor_configs, this is a preparation patch for
restoring the current settings when changing the settings fails due to
having not enough video-memory.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Since we now support more then 1 monitor / qxl device don't log a warning
when there are more monitors then qxl-devs. Note the warning does still
get written to the generated xorg.conf file, as that is intended for use with
xinerama setups, and there we do have a limit of 1 monitor / device.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
vdagent_x11_destroy() cleans up clipboard state and will tell the client
it is releasing the clipboard if it owns it. But when the vdagentd is
restarted the unix socket is disconnected and x11->vdagentd points to
already free-ed memory, leading to a crash.
This patch fixes this by not trying to send messages to the client on
cleanup when the unix socket is disconnected.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Xrandr itself has monitor sizes and coordinates as signed, and so does
most of our code, but not all of it. Making it all signed fixes a compiler
warning, and allows us to properly deal with the client sending negative
monitor coordinates.
Note: Unfortunately this does require some pointer casts when dealing with
the agent monitor-config message, as width and height are unsigned there :|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
| |
Move some variable declarations to right place.
Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
|
|
|
|
|
|
| |
This patch can be safely applied since it just deletes unused variables.
Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
|
|
|
|
|
|
|
| |
Otherwise we may end up using user-modes added for one output on another one,
messing up mode-deletion.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Using x11->width and x11->height to delete the old mode is wrong, since
this contains the total screen width and height, not the per monitor
width and height.
And we must not only delete the mode when replacing it with a new one,
but also when disabling the output.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using XRRGetScreenResources, causes the X-server to actively check for
new monitors, which generates Xrandr events even if nothing is changed, which
causes gnome-setting-manager to muck with the settings, racing with the
agent doing the same.
XRRGetScreenResourcesCurrent OTOH simply returns the last known settings
without any polling of the hardware and matching events being involved.
So use XRRGetScreenResourcesCurrent instead of XRRGetScreenResources, with
one exception. When the number of monitors is changed, so some outputs are
enabled or disabled, then the hardware polling is necessary to properly
reflect the connected / disconnected state in xrandr.
This requires Xrandr >= 1.3, note that since 0.12.0 we already depended
on >= 1.2 anyways, this patch raises the requirement to 1.3 and makes
it explict.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
| |
If the number of monitors changes, and the remaining monitors are
the same as before, then same_monitor_configs() would wrongly return
true, causing monitor-reconfiguarion to be skipped.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
| |
This is necessary because the randr settings may have been changed underneath
us (by gnome-settings-daemon for example).
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
| |
If the client is sending non 0,0 rooted monitor coordinates these won't
match what we've configured in the X-server if we check them before having
called zero_base_monitors().
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We already do this when comparing new received monitor settings from the
client with the current ones, since the X-server rounds the width / x
coordinates to a multiple of 8 when we set them. Currently what happens is:
1) We get a monitor-config with a non multiple 8 width
2) We set the crtc to this width
3) We set the screen to this width
4) We configure the uinput tablet with this width
5) The X-server adjusts things to a multiple of 8
6) We re-configure the uinput tablet with the new width
By rounding the width and x coordinates before applying them we safe all
this back and forth to the X-server.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The agent creates a unique mode vdagent-N per output, that is deleted
when the custom resolution is changed. In order to be deleted, it
can't be the current active crtc config.
Now, the vdagent just sets the mode to NULL, but that causes a change
of resolution probably due to gnome-settings-daemon (in RHEL6, it
switches to max resultion 2560x1600 before switching back to custom
resolution).
We can avoid deleting current mode by creating a different mode,
switching to it, and then deleting the previous mode. Also, we can
ignore some Create/Delete races with other XRandR clients that may
modify the mode simultaneously. This shouldn't be fatal, as long as
the rest of the resolution switching can take place.
|
| |
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
| |
In this case the client will always send info for qxl-devs monitors, and
set unused monitors to 0x0, deal properly with this, otherwise the
mouse ends up confused.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
| |
Both these files are more or less systemd specific.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
| |
This is a normal thing to happen, so it should not be an error message.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
| |
delete_mode() sets a the_mode variable, but then in the actual following
XRR calls uses mode->id, not the_mode->id, which works since they are the
same. As they are the same anyway, lets just get rid of the_mode completely.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
| |
Make the systemd service trigger on the addition of
/dev/virtio-ports/com.redhat.spice.0
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
| |
/etc/tmpfiles.d is reserved for local customization.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
| |
|
| |
|
|
|
|
| |
There are other spice-vdagentd.conf files coming.
|
|
|
|
|
|
|
|
| |
This resolves:
http://bugzilla.redhat.com/show_bug.cgi?id=747894
http://bugzilla.freedesktop.org/show_bug.cgi?id=49092
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
| |
|
|
|
|
| |
Avoids some extra reconfiguration with the client.
|
|
|
|
|
|
| |
I presume the reason to disable Crtc was to pass some XRandr check
that all crtc can fit in the screen. However, it is not a requirement
if the driver handles it.
|