mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 13:03:27 +02:00
Implement reverse otb items table
This commit is contained in:
@@ -159,10 +159,6 @@ void Painter::setAlphaWriting(bool enable)
|
||||
|
||||
void Painter::setResolution(const Size& resolution)
|
||||
{
|
||||
if(m_resolution == resolution)
|
||||
return;
|
||||
|
||||
|
||||
// The projection matrix converts from Painter's coordinate system to GL's coordinate system
|
||||
// * GL's viewport is 2x2, Painter's is width x height
|
||||
// * GL has +y -> -y going from bottom -> top, Painter is the other way round
|
||||
|
@@ -702,14 +702,17 @@ LRESULT WIN32Window::windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
|
||||
break;
|
||||
}
|
||||
case WM_SIZE: {
|
||||
bool forceResize = false;
|
||||
switch(wParam) {
|
||||
case SIZE_MAXIMIZED:
|
||||
m_maximized = true;
|
||||
m_visible = true;
|
||||
forceResize = true;
|
||||
break;
|
||||
case SIZE_RESTORED:
|
||||
m_maximized = false;
|
||||
m_visible = true;
|
||||
forceResize = true;
|
||||
break;
|
||||
case SIZE_MINIMIZED:
|
||||
m_visible = false;
|
||||
@@ -723,7 +726,7 @@ LRESULT WIN32Window::windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
|
||||
size.setWidth(std::max(std::min((int)LOWORD(lParam), 7680), m_minimumSize.width()));
|
||||
size.setHeight(std::max(std::min((int)HIWORD(lParam), 4320), m_minimumSize.height()));
|
||||
|
||||
if(m_visible && m_size != size) {
|
||||
if(m_visible && (forceResize || m_size != size)) {
|
||||
m_size = size;
|
||||
m_onResize(m_size);
|
||||
}
|
||||
|
@@ -793,6 +793,7 @@ void X11Window::poll()
|
||||
}
|
||||
case MapNotify:
|
||||
m_visible = true;
|
||||
needsResizeUpdate = true;
|
||||
break;
|
||||
case UnmapNotify:
|
||||
m_visible = false;
|
||||
|
Reference in New Issue
Block a user