File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
platform/linuxbsd/wayland Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -576,6 +576,37 @@ Vector<DisplayServer::WindowID> DisplayServerWayland::get_window_list() const {
576
576
return ret;
577
577
}
578
578
579
+ int64_t DisplayServerWayland::window_get_native_handle (HandleType p_handle_type, WindowID p_window) const {
580
+ MutexLock mutex_lock (wayland_thread.mutex );
581
+
582
+ switch (p_handle_type) {
583
+ case DISPLAY_HANDLE: {
584
+ return (int64_t )wayland_thread.get_wl_display ();
585
+ } break ;
586
+
587
+ case WINDOW_HANDLE: {
588
+ return (int64_t )wayland_thread.window_get_wl_surface (p_window);
589
+ } break ;
590
+
591
+ case WINDOW_VIEW: {
592
+ return 0 ; // Not supported.
593
+ } break ;
594
+
595
+ #ifdef GLES3_ENABLED
596
+ case OPENGL_CONTEXT: {
597
+ if (egl_manager) {
598
+ return (int64_t )egl_manager->get_context (p_window);
599
+ }
600
+ return 0 ;
601
+ } break ;
602
+ #endif // GLES3_ENABLED
603
+
604
+ default : {
605
+ return 0 ;
606
+ } break ;
607
+ }
608
+ }
609
+
579
610
DisplayServer::WindowID DisplayServerWayland::get_window_at_screen_position (const Point2i &p_position) const {
580
611
// Standard Wayland APIs don't support this.
581
612
return MAIN_WINDOW_ID;
Original file line number Diff line number Diff line change @@ -203,6 +203,8 @@ class DisplayServerWayland : public DisplayServer {
203
203
204
204
virtual Vector<DisplayServer::WindowID> get_window_list () const override ;
205
205
206
+ virtual int64_t window_get_native_handle (HandleType p_handle_type, WindowID p_window = MAIN_WINDOW_ID) const override ;
207
+
206
208
virtual WindowID get_window_at_screen_position (const Point2i &p_position) const override ;
207
209
208
210
virtual void window_attach_instance_id (ObjectID p_instance, WindowID p_window_id = MAIN_WINDOW_ID) override ;
You can’t perform that action at this time.
0 commit comments