Fix RWindow::SetResizable on linux/X-server
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 1m38s
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 1m38s
This commit is contained in:
@@ -83,13 +83,18 @@ void RWindow::SetCursorVisible(bool cursor_enable) {
|
||||
void RWindow::SetResizable(bool sizable) {
|
||||
XGetWindowAttributes(display,window,&windowAttributes);
|
||||
|
||||
|
||||
this->resizable = sizable;
|
||||
if (!sizable)
|
||||
{
|
||||
Logger::Debug("Once you've done this you cannot make it resizable again.");
|
||||
hints.flags = PMinSize | PMaxSize;
|
||||
hints.min_width = hints.max_width = windowAttributes.width;
|
||||
hints.min_height = hints.max_height = windowAttributes.height;
|
||||
XSetWMNormalHints(display, window, &hints);
|
||||
}
|
||||
//this->SetFlag(RWindowFlags::RESIZABLE, resizable);
|
||||
Logger::Debug("Once you've done this you cannot make it resizable again.");
|
||||
hints.flags = PMinSize | PMaxSize;
|
||||
hints.min_width = hints.max_width = windowAttributes.width;
|
||||
hints.min_height = hints.max_height = windowAttributes.height;
|
||||
XSetWMNormalHints(display, window, &hints);
|
||||
|
||||
}
|
||||
|
||||
void RWindow::SetFlag(RWindowFlags flag, bool state) {
|
||||
@@ -352,7 +357,7 @@ void RWindow::Open() {
|
||||
ExposureMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |
|
||||
PointerMotionMask |
|
||||
PointerMotionHintMask | FocusChangeMask | StructureNotifyMask | SubstructureRedirectMask |
|
||||
SubstructureNotifyMask | CWColormap);
|
||||
SubstructureNotifyMask | CWColormap );
|
||||
XMapWindow(display, window);
|
||||
XStoreName(display, window, title.c_str());
|
||||
wmDeleteWindow = XInternAtom(display, "WM_DELETE_WINDOW", False);
|
||||
|
Reference in New Issue
Block a user