mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 06:57:36 -06:00
FIX: wxDisplay crash on wxNOT_FOUND
Change-Id: If7b936d361873e20fb71b7fc35c9d270cd39a763
This commit is contained in:
parent
d4ddd8f470
commit
af54a34567
5 changed files with 8 additions and 8 deletions
|
@ -342,7 +342,7 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
|
|||
// BBS: fix taskbar overlay on windows
|
||||
#ifdef WIN32
|
||||
auto setMaxSize = [this]() {
|
||||
wxDisplay display(wxDisplay::GetFromWindow(this));
|
||||
wxDisplay display(this);
|
||||
auto size = display.GetClientArea().GetSize();
|
||||
// 8 pixels shadow
|
||||
SetMaxSize(size + wxSize{16, 16});
|
||||
|
@ -353,7 +353,7 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
|
|||
});
|
||||
setMaxSize();
|
||||
this->Bind(wxEVT_MAXIMIZE, [this](auto &e) {
|
||||
wxDisplay display(wxDisplay::GetFromWindow(this));
|
||||
wxDisplay display(this);
|
||||
auto pos = display.GetClientArea().GetPosition();
|
||||
Move(pos - wxPoint{8, 8});
|
||||
e.Skip();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue