aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.cpp
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2021-01-10 19:51:03 +0100
committerladevieq <ladevie.quentin@gmail.com>2021-01-10 19:51:03 +0100
commit94c1b2d414055f9a4ea203fb210666aa769d0096 (patch)
tree5bc7e359ba63c1137f5aa276fee1219924e7a0f9 /src/window.cpp
parent78302e1982c1b7b727c95603611b19913f5c13d0 (diff)
Create xcb surface and swapchain
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 93c7517..1bfc903 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -1,6 +1,7 @@
#include "window.hpp"
-window::window() {
+window::window(uint32_t width, uint32_t height)
+ :width(width), height(height) {
connection = xcb_connect(NULL, NULL);
win = xcb_generate_id(connection);
@@ -14,8 +15,8 @@ window::window() {
screen_info->root,
10,
10,
- 400,
- 400,
+ width,
+ height,
10,
XCB_WINDOW_CLASS_INPUT_OUTPUT,
screen_info->root_visual,