summaryrefslogtreecommitdiff
path: root/src/user/raleigh/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/raleigh/window.cpp')
-rw-r--r--src/user/raleigh/window.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/user/raleigh/window.cpp b/src/user/raleigh/window.cpp
index 41eb9ce..c23545b 100644
--- a/src/user/raleigh/window.cpp
+++ b/src/user/raleigh/window.cpp
@@ -3,6 +3,8 @@
#include <popups/info.h>
#include <knob/heap.h>
+#include <knob/format.h>
+
namespace raleigh {
window::window(widget &root, _pixel_t bg_color, bool (*on_close)(window &))
: handle(0), size(root.size), root(root), bg_color(bg_color),
@@ -11,7 +13,7 @@ namespace raleigh {
root.window_offset = coord(0, 0);
root.notify_window_change();
- pixbuf = (_pixel_t *)get_block(size.x * size.y * sizeof(_pixel_t));
+ pixbuf = new _pixel_t[size.x * size.y];
if (!pixbuf)
show_error_and_quitf("Failed to create %d byte pixel buffer\nfor requested %dx%d pixel window.", size.x * size.y * sizeof(_pixel_t), size.x, size.y);