Merge branch 'primary-display'

Handle the situation when primary display is not the first one.

See https://github.com/wxWidgets/wxWidgets/pull/1641
This commit is contained in:
Vadim Zeitlin
2019-11-10 00:39:14 +01:00
6 changed files with 53 additions and 53 deletions

View File

@@ -42,12 +42,14 @@ class WXDLLIMPEXP_FWD_CORE wxDisplayImpl;
class WXDLLIMPEXP_CORE wxDisplay
{
public:
// default ctor creates the object corresponding to the primary display
wxDisplay();
// initialize the object containing all information about the given
// display
//
// the displays are numbered from 0 to GetCount() - 1, 0 is always the
// primary display and the only one which is always supported
wxDisplay(unsigned n = 0);
// the displays are numbered from 0 to GetCount() - 1
explicit wxDisplay(unsigned n);
// create display object corresponding to the display of the given window
// or the default one if the window display couldn't be found

View File

@@ -37,6 +37,9 @@ public:
return m_impls[n];
}
// Return the primary display object, creating it if necessary.
wxDisplayImpl* GetPrimaryDisplay();
// get the total number of displays
virtual unsigned GetCount() = 0;