set work area size

svn path=/trunk/; revision=5749
This commit is contained in:
Martin Fuchs 2003-08-22 13:27:58 +00:00
parent 5f5441389e
commit cd813d619c
3 changed files with 17 additions and 10 deletions

View file

@ -209,9 +209,11 @@ LRESULT DesktopWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
break;
case WM_SETFOCUS:
// close startup menu and other popup menus like on the tray notification icons
// close startup menu and other popup menus like that of tray notification icons
if (wparam)
SendMessage((HWND)wparam, WM_CANCELMODE, 0, 0);
PostMessage((HWND)wparam, WM_CANCELMODE, 0, 0);
else
PostMessage(HWND_BROADCAST, WM_CANCELMODE, 0, 0);
goto def;
case WM_GETISHELLBROWSER:

View file

@ -161,14 +161,20 @@ LRESULT DesktopBar::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
goto def;
case WM_SIZE: {
ClientRect clnt(_hwnd);
int cx = LOWORD(lparam);
int cy = HIWORD(lparam);
if (_hwndTaskBar)
MoveWindow(_hwndTaskBar, TASKBAR_LEFT, 0, clnt.right-TASKBAR_LEFT-(NOTIFYAREA_WIDTH+1), cy, TRUE);
MoveWindow(_hwndTaskBar, TASKBAR_LEFT, 0, cx-TASKBAR_LEFT-(NOTIFYAREA_WIDTH+1), cy, TRUE);
if (_hwndNotify)
MoveWindow(_hwndNotify, clnt.right-(NOTIFYAREA_WIDTH+1), 1, NOTIFYAREA_WIDTH, cy-2, TRUE);
MoveWindow(_hwndNotify, cx-(NOTIFYAREA_WIDTH+1), 1, NOTIFYAREA_WIDTH, cy-2, TRUE);
WindowRect rect(_hwnd);
int height = rect.bottom-rect.top;
RECT work_area = {0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)-(height-1)};
SystemParametersInfo(SPI_SETWORKAREA, 0, &work_area, 0);
PostMessage(HWND_BROADCAST, WM_SETTINGCHANGE, SPI_SETWORKAREA, 0);
break;}
case WM_CLOSE:

View file

@ -124,8 +124,9 @@ LRESULT NotifyArea::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Refresh();
}
}
} else
return super::WndProc(nmsg, wparam, lparam);
}
return super::WndProc(nmsg, wparam, lparam);
}
return 0;
@ -136,15 +137,13 @@ LRESULT NotifyArea::ProcessTrayNotification(int notify_code, NOTIFYICONDATA* pni
switch(notify_code) {
case NIM_ADD:
case NIM_MODIFY:
if ((int)pnid->uID >= 0) {
if ((int)pnid->uID >= 0) { //TODO: fix for windows task manager
NotifyInfo& entry = _icon_map[pnid] = pnid;
// a new entry?
if (entry._idx == -1)
entry._idx = ++_next_idx;
Refresh();
} else {
Refresh();
}
break;