Quote
disrupted
nah.. it's not at your end, but i don't seem to trigger the maximise problem now because my taskbar is at the top(like apple) and set to not be on top, so probably that's why. so the bug is still there but differs according to taskbar position..
hao, that titlebar removal thing-although might be pretty for some- but is causing problems
I know...
That's why I 'm trying to fix it. Let me first describe what my current fix is:
KM detects the taskbar position and size from Windows, then it changes its window size and remove the border according to use's triggering of maximizing command.
The problem is it works on some system (like mine, I'm using Win 7 beta2 at this moment), but not works on some system...and I cannot reproduce those bugs on my system! (sad...)
Once the window is maximized and closed, KM should remember the status of it, next time it should be openned maximized also... Which I don't understand why it's not working on some system...
The code itself says all:
void CBrowserFrame::OnToggleWindow()
{
if(m_zoom){
int left=theApp.preferences.GetInt("kmeleon.window.left", 100);
int right=theApp.preferences.GetInt("kmeleon.window.right",900);
int top=theApp.preferences.GetInt("kmeleon.window.top", 100);
int bottom=theApp.preferences.GetInt("kmeleon.window.bottom", 800);
SetWindowPos(NULL,left,top,right-left,bottom-top,SWP_SHOWWINDOW);
m_zoom=false;
if (m_border)
ModifyStyle(0 , WS_SIZEBOX|WS_THICKFRAME, SWP_DRAWFRAME);
else
ModifyStyle(0, SWP_DRAWFRAME);
theApp.preferences.SetBool("kmeleon.display.WindowMaximized", FALSE);
}
else{
GetWindowRect(&rc);
theApp.preferences.SetInt("kmeleon.window.left", rc.left);
theApp.preferences.SetInt("kmeleon.window.right", rc.right);
theApp.preferences.SetInt("kmeleon.window.top", rc.top);
theApp.preferences.SetInt("kmeleon.window.bottom", rc.bottom);
int cx = GetSystemMetrics(SM_CXSCREEN);
int cy = GetSystemMetrics(SM_CYSCREEN);
CRect *pRect= new CRect;;
HWND hShellTrayWnd = ::FindWindow(_T("Shell_TrayWnd"), NULL);
::GetWindowRect(hShellTrayWnd, pRect);
if (pRect->Height()<500 && pRect->bottom==cy)
SetWindowPos(NULL,0,0,cx,cy-pRect->Height()+1,SWP_SHOWWINDOW);
if (pRect->Height()<500 && pRect->top==0)
SetWindowPos(NULL,0,pRect->bottom,cx,cy-pRect->Height()+1,SWP_SHOWWINDOW);
if (pRect->Height()>500 && pRect->left==0)
SetWindowPos(NULL,pRect->right,0,cx-pRect->Width()+1,cy,SWP_SHOWWINDOW);
if (pRect->Height()>500 && pRect->right==cx)
SetWindowPos(NULL,0,0,cx-pRect->Width()+1,cy,SWP_SHOWWINDOW);
m_zoom=true;
ModifyStyle(WS_SIZEBOX|WS_THICKFRAME, 0 , SWP_DRAWFRAME);
theApp.preferences.SetBool("kmeleon.display.WindowMaximized", TRUE);
}
}
There are some other code in the initialization which reads the setting for the size of the window then open km accordingly also but that shouldn't create the bug.
At this moment, I introduced this titleless window design, but also I left the old title window option present (notice several buttons on the system toolbar?) which you can enable/disable titleless window anytime...