webui-dev / webui

Use any web browser or WebView as GUI, with your preferred language in the backend and HTML5 in the frontend, all in a lightweight portable lib.
https://webui.me
MIT License
2.35k stars 144 forks source link

Update linux webview positon fallback values values to match type declarations #377

Closed ttytm closed 1 month ago

ttytm commented 1 month ago

Fixes a warning when compiling on Linux caused by the webview struct taking uints but passing a negative value:


src/webui.c: In function ‘_webui_wv_show’:
src/webui.c:9728:45: warning: operand of ‘?:’ changes signedness from ‘int’ to ‘unsigned int’ due to unsignedness of other operand [-Wsign-compare]
 9728 |         webView->x = (win->x > 0 ? win->x : -1);
      |                                             ^~
src/webui.c:9729:45: warning: operand of ‘?:’ changes signedness from ‘int’ to ‘unsigned int’ due to unsignedness of other operand [-Wsign-compare]
 9729 |         webView->y = (win->y > 0 ? win->y : -1);
      |                                             ^~