andlabs / andlabs/libui

GTK: onContentSizeChanged handler invoking uiWindowSetContentSize has no effect

Đang mở
#234 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C
Star
10.9k
Fork
612
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I expect this to stop the window being resized:

```
/**
gcc -I/usr/include bug.c -lui -o bug
**/
#include
#include

uiWindow *win;

int test_is_closing(uiWindow *w, void *d) {
uiControlDestroy(uiControl(w));
uiQuit();

return 0;
}

void test_has_changed(uiWindow *window, void *arg) {
uiWindowSetContentSize(window, 640, 480);
}

int main(int argc, char **argv) {
const char *initError;
uiInitOptions options;

initError = uiInit(&options);

if (initError) {
return 1;
}

win = uiNewWindow("Title", 640, 480, 0);

uiWindowOnClosing(win, test_is_closing, win);
uiWindowOnContentSizeChanged(win, test_has_changed, win);

uiControlShow(uiControl(win));

uiMain();

uiUninit();

return 0;
}
```

Works on OSX; well enough anyway, user initiated resize results in moving the window.

Messy on windows; You can see frame of window being resized;

Doesn't work at all on GTK, the window is resized (as if the handler were not installed).

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.