diff --git a/ChangeLog b/ChangeLog index f42768eac2..b90ff4046b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-08-22 Tor Lillqvist + + * 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 15:46:56 2004 Soeren Sandmann * gtk/gtkpaned.c (gtk_paned_class_init): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f42768eac2..b90ff4046b 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +2004-08-22 Tor Lillqvist + + * 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 15:46:56 2004 Soeren Sandmann * gtk/gtkpaned.c (gtk_paned_class_init): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index f42768eac2..b90ff4046b 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +2004-08-22 Tor Lillqvist + + * 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 15:46:56 2004 Soeren Sandmann * gtk/gtkpaned.c (gtk_paned_class_init): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f42768eac2..b90ff4046b 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +2004-08-22 Tor Lillqvist + + * 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 15:46:56 2004 Soeren Sandmann * gtk/gtkpaned.c (gtk_paned_class_init): diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c index 28510dd155..ff19b2b0b3 100644 --- a/gdk/win32/gdkdisplay-win32.c +++ b/gdk/win32/gdkdisplay-win32.c @@ -80,33 +80,20 @@ enum_monitor (HMONITOR hmonitor, #define MONITORINFOF_PRIMARY 1 #endif - if (monitor_info.dwFlags & MONITORINFOF_PRIMARY) + 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) { - /* 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; - /* 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; }