mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[EXPLORER]: Minor stylistic formatting changes; add a notice about a SystemParametersInfoW(SPI_SETWORKAREA) call, concerning its action when explorer's taskbar size is changed.
svn path=/trunk/; revision=71522
This commit is contained in:
parent
a3fdbc7eca
commit
1b9a4118a8
1 changed files with 29 additions and 35 deletions
|
@ -511,8 +511,7 @@ public:
|
|||
mi.cbSize = sizeof(mi);
|
||||
hMon = MonitorFromRect(pRect, dwFlags);
|
||||
if (hMon != NULL &&
|
||||
GetMonitorInfo(hMon,
|
||||
&mi))
|
||||
GetMonitorInfo(hMon, &mi))
|
||||
{
|
||||
*pRect = mi.rcMonitor;
|
||||
}
|
||||
|
@ -539,8 +538,7 @@ public:
|
|||
now), minimize the risk that we determine a wrong monitor by
|
||||
using the center point of the tray window if we can't determine
|
||||
it using the rectangle. */
|
||||
hMon = MonitorFromRect(pRect,
|
||||
MONITOR_DEFAULTTONULL);
|
||||
hMon = MonitorFromRect(pRect, MONITOR_DEFAULTTONULL);
|
||||
if (hMon == NULL)
|
||||
{
|
||||
POINT pt;
|
||||
|
@ -549,8 +547,7 @@ public:
|
|||
pt.y = pRect->top + ((pRect->bottom - pRect->top) / 2);
|
||||
|
||||
/* be less error-prone, find the nearest monitor */
|
||||
hMon = MonitorFromPoint(pt,
|
||||
MONITOR_DEFAULTTONEAREST);
|
||||
hMon = MonitorFromPoint(pt, MONITOR_DEFAULTTONEAREST);
|
||||
}
|
||||
|
||||
return hMon;
|
||||
|
@ -571,11 +568,9 @@ public:
|
|||
{
|
||||
/* Hm, the monitor is gone? Try to find a monitor where it
|
||||
could be located now */
|
||||
hMon = GetMonitorFromRect(
|
||||
pRect);
|
||||
hMon = GetMonitorFromRect(pRect);
|
||||
if (hMon == NULL ||
|
||||
!GetMonitorInfo(hMon,
|
||||
&mi))
|
||||
!GetMonitorInfo(hMon, &mi))
|
||||
{
|
||||
hMon = NULL;
|
||||
goto GetPrimaryRect;
|
||||
|
@ -674,8 +669,7 @@ GetPrimaryRect:
|
|||
|
||||
/* FIXME - calculate */
|
||||
|
||||
GetTrayRectFromScreenRect(
|
||||
Position,
|
||||
GetTrayRectFromScreenRect(Position,
|
||||
&rcScreen,
|
||||
&szWnd,
|
||||
pRect);
|
||||
|
@ -716,9 +710,7 @@ GetPrimaryRect:
|
|||
rcScreen.top = 0;
|
||||
|
||||
/* Determine the screen rectangle */
|
||||
hMon = MonitorFromPoint(pt,
|
||||
MONITOR_DEFAULTTONULL);
|
||||
|
||||
hMon = MonitorFromPoint(pt, MONITOR_DEFAULTTONULL);
|
||||
if (hMon != NULL)
|
||||
{
|
||||
MONITORINFO mi;
|
||||
|
@ -868,8 +860,7 @@ GetPrimaryScreenRect:
|
|||
//m_TrayRects[DraggingPosition] = rcTray;
|
||||
}
|
||||
|
||||
//Monitor = CalculateValidSize(
|
||||
// DraggingPosition,
|
||||
//Monitor = CalculateValidSize(DraggingPosition,
|
||||
// &rcTray);
|
||||
|
||||
m_Monitor = m_DraggingMonitor;
|
||||
|
@ -1001,8 +992,8 @@ ChangePos:
|
|||
GetScreenRect(m_Monitor, &rcWorkArea);
|
||||
m_PreviousMonitor = m_Monitor;
|
||||
|
||||
/* If AutoHide is false then change the workarea to exclude the area that
|
||||
the taskbar covers. */
|
||||
/* If AutoHide is false then change the workarea to exclude
|
||||
the area that the taskbar covers. */
|
||||
if (!AutoHide)
|
||||
{
|
||||
switch (m_Position)
|
||||
|
@ -1022,6 +1013,10 @@ ChangePos:
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Resize the current monitor work area. Win32k will also send
|
||||
* a WM_SIZE message to automatically resize the desktop.
|
||||
*/
|
||||
SystemParametersInfoW(SPI_SETWORKAREA,
|
||||
1,
|
||||
&rcWorkArea,
|
||||
|
@ -1167,8 +1162,7 @@ ChangePos:
|
|||
usable results */
|
||||
for (Pos = ABE_LEFT; Pos <= ABE_BOTTOM; Pos++)
|
||||
{
|
||||
GetTrayRectFromScreenRect(
|
||||
Pos,
|
||||
GetTrayRectFromScreenRect(Pos,
|
||||
&rcScreen,
|
||||
&m_TraySize,
|
||||
&m_TrayRects[Pos]);
|
||||
|
|
Loading…
Reference in a new issue