aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-01-17 17:29:49 +0100
committerdec05eba <dec05eba@protonmail.com>2023-01-17 17:29:49 +0100
commit6096469348d8d94ed0a92a6123983eba772cf347 (patch)
tree37d8625d85a6bf711a3b5597faba8d82a044759e
parentabc3ff63805f86af3ecc45b23aaf4e49ff9a3d63 (diff)
Add option to set window background color
This window background color is different than window.clear(color) because this window color is the background color if the window itself, which means if there is a delay between creating the window and the first frame display then the window background color is black, but if window color is set then that color will be displayed instead. Normally you want to set the window background color to the same color as the color you use in window.clear(color).
m---------depends/mgl0
-rw-r--r--include/mglpp/window/Window.hpp1
2 files changed, 1 insertions, 0 deletions
diff --git a/depends/mgl b/depends/mgl
-Subproject bb770991b2d688b247106e116c1ee222c6dbbe1
+Subproject c6d09be0a56c7b96be48f074901a53d7f76c25c
diff --git a/include/mglpp/window/Window.hpp b/include/mglpp/window/Window.hpp
index 2ba61ff..2f148e7 100644
--- a/include/mglpp/window/Window.hpp
+++ b/include/mglpp/window/Window.hpp
@@ -45,6 +45,7 @@ namespace mgl {
bool hidden = false;
bool override_redirect = false;
bool support_alpha = false; /* support alpha for the window */
+ Color background_color = {0, 0, 0, 0};
};
Window();