Commit a63a44ff authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist
Browse files

Report whole of (primary) monitor, including any taskbars. Excluding the

2004-08-22  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdisplay-win32.c (enum_monitor, gdk_display_open):
	Report whole of (primary) monitor, including any taskbars.
	Excluding the taskbar area from the "root window" reported to GDK
	doesn't seem to be that useful although gdk/win32 had been doing it
	for a very long time. (#149013, see also #145467 and #148526)
parent c49739a0
2004-08-22 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdisplay-win32.c (enum_monitor, gdk_display_open):
Report whole of (primary) monitor, including any taskbars.
Excluding the taskbar area from the "root window" reported to GDK
doesn't seem to be that useful although gdk/win32 had been doing it
for a very long time. (#149013, see also #145467 and #148526)
Sun Aug 22 16:55:15 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkexpander.c
......
2004-08-22 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdisplay-win32.c (enum_monitor, gdk_display_open):
Report whole of (primary) monitor, including any taskbars.
Excluding the taskbar area from the "root window" reported to GDK
doesn't seem to be that useful although gdk/win32 had been doing it
for a very long time. (#149013, see also #145467 and #148526)
Sun Aug 22 16:55:15 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkexpander.c
......
2004-08-22 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdisplay-win32.c (enum_monitor, gdk_display_open):
Report whole of (primary) monitor, including any taskbars.
Excluding the taskbar area from the "root window" reported to GDK
doesn't seem to be that useful although gdk/win32 had been doing it
for a very long time. (#149013, see also #145467 and #148526)
Sun Aug 22 16:55:15 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkexpander.c
......
2004-08-22 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdisplay-win32.c (enum_monitor, gdk_display_open):
Report whole of (primary) monitor, including any taskbars.
Excluding the taskbar area from the "root window" reported to GDK
doesn't seem to be that useful although gdk/win32 had been doing it
for a very long time. (#149013, see also #145467 and #148526)
Sun Aug 22 16:55:15 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkexpander.c
......
......@@ -80,33 +80,20 @@ enum_monitor (HMONITOR hmonitor,
#define MONITORINFOF_PRIMARY 1
#endif
if (monitor_info.dwFlags & MONITORINFOF_PRIMARY)
{
/* For the primary monitor, use SPI_GETWORKAREA */
RECT rect;
SystemParametersInfo (SPI_GETWORKAREA, 0, &rect, 0);
monitor->x = rect.left;
monitor->y = rect.top;
monitor->width = rect.right - rect.left;
monitor->height = rect.bottom - rect.top;
monitor->x = monitor_info.rcMonitor.left;
monitor->y = monitor_info.rcMonitor.top;
monitor->width = monitor_info.rcMonitor.right - monitor_info.rcMonitor.left;
monitor->height = monitor_info.rcMonitor.bottom - monitor_info.rcMonitor.top;
if (monitor_info.dwFlags & MONITORINFOF_PRIMARY &&
*index != 0)
{
/* Put primary monitor at index 0, just in case somebody needs
* to know which one is the primary.
*/
if (*index != 0)
{
GdkRectangle temp = *monitor;
*monitor = _gdk_monitors[0];
_gdk_monitors[0] = temp;
}
}
else
{
monitor->x = monitor_info.rcMonitor.left;
monitor->y = monitor_info.rcMonitor.top;
monitor->width = monitor_info.rcMonitor.right - monitor_info.rcMonitor.left;
monitor->height = monitor_info.rcMonitor.bottom - monitor_info.rcMonitor.top;
GdkRectangle temp = *monitor;
*monitor = _gdk_monitors[0];
_gdk_monitors[0] = temp;
}
(*index)++;
......@@ -172,15 +159,18 @@ gdk_display_open (const gchar *display_name)
else
#endif /* HAVE_MONITOR_INFO */
{
RECT rect;
unsigned int width, height;
_gdk_num_monitors = 1;
_gdk_monitors = g_new (GdkRectangle, 1);
SystemParametersInfo (SPI_GETWORKAREA, 0, &rect, 0);
_gdk_monitors[0].x = rect.left;
_gdk_monitors[0].y = rect.top;
_gdk_monitors[0].width = rect.right - rect.left;
_gdk_monitors[0].height = rect.bottom - rect.top;
width = GetSystemMetrics (SM_CXSCREEN);
height = GetSystemMetrics (SM_CYSCREEN);
_gdk_monitors[0].x = 0;
_gdk_monitors[0].y = 0;
_gdk_monitors[0].width = width;
_gdk_monitors[0].height = height;
_gdk_offset_x = 0;
_gdk_offset_y = 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment