Commit Graph

14 Commits

Author SHA1 Message Date
Frediano Ziglio
d8d23f36a2 display_configuration: Update log strings
For other strings resolution is reported as "WxH", no spaces
around "x".

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Francesco Giudici <fgiudici@redhat.com>
2020-05-29 11:22:50 +01:00
Frediano Ziglio
7a7c3b22e2 display_configuration: Define WINVER to avoid some declaration
Some declarations are available in MingW only defining a more recent
version of WINVER. Set WINVER to 0x0601 (Windows 7) to enable these
definitions.
This allows to clean some files.
The definition were already available in Fedora 22.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2019-11-06 09:24:30 +00:00
Yuri Benditovich
93f3aee7b4 make display disconnection persistent
https://bugzilla.redhat.com/show_bug.cgi?id=1477191
Currently on Win10 when one of multiple displays is
disconnected by the client, the qxl-wddm-dod driver
does not receive any update, the system just stops using
this adapter for rendering. As a result, the 'disconnected'
state of the adapter is not saved anywhere. On further
connect the client side recognize the adapter as active
and opens window for it. Current commit fixes the problem
by sending QXL_ESCAPE_MONITOR_CONFIG with zero area
to disabled adapter.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2019-03-08 11:43:16 +00:00
Yuri Benditovich
12a8f08f32 introduce turn_monitor_off method of WDDM interface
Adding method 'turn_monitor_off' to WDDM interface.
It sends QXL_ESCAPE_MONITOR_CONFIG escape with zeroed
display size to qxl-wddm-dod driver.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2019-03-08 11:43:16 +00:00
Yuri Benditovich
6e159118b2 construct WDDMMonitorConfigEscape also with NULL DisplayMode
Adding possibility to construct WDDMMonitorConfigEscape object
with NULL parameter of DisplayMode. In this case all the fields
depending on DisplayMode are set to zero.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2019-03-08 11:40:57 +00:00
Frediano Ziglio
022c56ac6a Avoid unused variable warning
Currently happens using Visual Studio 2015.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-05-28 14:45:05 +01:00
Frediano Ziglio
debf1fe981 Make CCD::load_api throw exception on its own
Avoid to use two different ways to handle errors.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Sameeh Jubran <sameeh@daynix.com>
2016-09-02 16:56:09 +01:00
Frediano Ziglio
b24a935335 Fails CCD initialisation if get_config_buffers detect WDDM is not present
There's no point continuing without WDDM as CCD cannot work without it.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Sameeh Jubran <sameeh@daynix.com>
2016-09-02 16:55:54 +01:00
Frediano Ziglio
67b63fe6f7 Do not print function calling vd_printf
vd_printf already print the current function

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-09-02 15:26:27 +01:00
Frediano Ziglio
6bdd83d780 Remove small possible buffer overflow
wcsncpy requires number of characters, not bytes.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-09-01 15:45:11 +01:00
Sameeh Jubran
3616a7ed38 Implementing WDDM interface to support multiple monitors and arbitrary resolution
The Direct3D 9 API operates on either the Windows XP display driver
model (XPDM) or the Windows Vista display driver model (WDDM), depending
on the operating system installed.

This patch implements the WDDM interface while using the CCD API to do
so. Moreover it introduces multiple monitors support and arbitrary
resolution for Windows 10 while preserving backward compatiblity with
previous versions of Windows.

Based on a patch by Sandy Stutsman <sstutsma at redhat.com>

Signed-off-by: Dmitry Fleytman <dfleytma at redhat.com>
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-09-01 12:32:59 +01:00
Sameeh Jubran
3856b1147a Initialize buffers before querying display config
The buffers and buffer sizes should be initialized and allocated. This
patch fixes a possible case where vdagent can get stuck, as the
function _pfnQueryDisplayConfig can return ERROR_INVALID_PARAMETER
if the buffers aren't intialized.
The call to free_config_buffers is superfluous because it is called
inside get_config_buffers.

Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-08-30 14:22:56 +01:00
Sameeh Jubran
d81d8cdbde Encapsulating XPDM implementation
The Direct3D 9 API operates on either the Windows XP display driver
model (XPDM) or the Windows Vista display driver model (WDDM), depending
on the operating system installed.

This patch encapsulates the current XPDM interface implementation into
XPDMInterface class which inherits DisplayConfig class. This patch
makes it easier to introduce WDDM interface to Vdagent in future
patches.

Based on a patch by Sandy Stutsman <sstutsma@redhat.com>

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-08-16 11:19:02 +01:00
Sameeh Jubran
588a7134df Introducing Windows CCD API
The Connecting and Configuring Displays (CCD) Win32 APIs
provide more control over the desktop display setup. The CCD APIs
move away from using Windows Graphics Device Interface (GDI)
concepts like view name and toward Windows Display Driver Model
(WDDM) concepts like adapter, source, and target identifiers.
More info on the CCD API can be found here:
https://msdn.microsoft.com/en-us/library/windows/hardware/ff539590(v=vs.85).aspx

This patch introduces partial functionality from the CCD API
needed by vdagent. It is needed by vdagent in order to support
multiple monitors and arbitrary resolution on Windows 10.

Based on a patch by Sandy Stutsman <sstutsma@redhat.com>

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-08-16 11:19:00 +01:00