summaryrefslogtreecommitdiff
path: root/c++
diff options
context:
space:
mode:
Diffstat (limited to 'c++')
-rw-r--r--c++/window-opengl/gl_xcb.cpp4
-rw-r--r--c++/window/xcb.cpp4
-rw-r--r--c++/window/xcb.h3
3 files changed, 9 insertions, 2 deletions
diff --git a/c++/window-opengl/gl_xcb.cpp b/c++/window-opengl/gl_xcb.cpp
index 42e8f5d..41c262a 100644
--- a/c++/window-opengl/gl_xcb.cpp
+++ b/c++/window-opengl/gl_xcb.cpp
@@ -86,7 +86,7 @@ own<gl_window<gl::backend::linux_xcb>> gl_context<gl::backend::linux_xcb>::creat
return nullptr;
}
- ::GLXWindow glx_win = glXCreateWindow(device_->get_xcb_display(), fb_config_, win->xcb_window_, nullptr);
+ ::GLXWindow glx_win = glXCreateWindow(device_->get_xcb_display(), fb_config_, win->get_xcb_window_handle(), nullptr);
return heap<gl_window<gl::backend::linux_xcb>>(std::move(win), *this, glx_win);
}
@@ -194,7 +194,7 @@ own<gl_context<gl::backend::linux_xcb> > create_gl_context(io_provider& prov, co
gl_window<gl::backend::linux_xcb>::gl_window(own<xcb_window> &&win, gl_context<gl::backend::linux_xcb> &ctx,
::GLXWindow glx_win)
- : window_{std::move(win)}, context_{&ctx}, glx_window_{glx_win} {}
+ : window_{std::move(win)}, context_{&ctx}, glx_window_handle_{glx_win} {}
gl_window<gl::backend::linux_xcb>::~gl_window() {
assert(context.device);
diff --git a/c++/window/xcb.cpp b/c++/window/xcb.cpp
index dac5271..422a0b6 100644
--- a/c++/window/xcb.cpp
+++ b/c++/window/xcb.cpp
@@ -264,5 +264,9 @@ void window<backend::linux_xcb>::keyboard_event(int16_t x, int16_t y, uint32_t k
assert(false);
}
+xcb_window_t window<backend::linux_xcb>::get_xcb_window_handle() const{
+ return xcb_window_;
+}
+
}
}
diff --git a/c++/window/xcb.h b/c++/window/xcb.h
index 0457b58..fd9532b 100644
--- a/c++/window/xcb.h
+++ b/c++/window/xcb.h
@@ -98,6 +98,9 @@ public:
void mouse_event(int16_t x, int16_t y, uint16_t state, bool pressed);
void mouse_move_event(int16_t x, int16_t y);
void keyboard_event(int16_t x, int16_t y, uint32_t keycode, bool pressed, bool repeat);
+
+ // XCB specific things
+ xcb_window_t get_xcb_window_handle() const;
};
}
}