Pārlūkot izejas kodu

glx wants to run windows in app thread

David Rose 19 gadi atpakaļ
vecāks
revīzija
c2f92bb29d

+ 13 - 0
panda/src/glxdisplay/glxGraphicsPipe.cxx

@@ -166,6 +166,19 @@ pipe_constructor() {
   return new glxGraphicsPipe;
   return new glxGraphicsPipe;
 }
 }
 
 
+////////////////////////////////////////////////////////////////////
+//     Function: glxGraphicsPipe::get_preferred_window_thread
+//       Access: Public, Virtual
+//  Description: Returns an indication of the thread in which this
+//               GraphicsPipe requires its window processing to be
+//               performed: typically either the app thread (e.g. X)
+//               or the draw thread (Windows).
+////////////////////////////////////////////////////////////////////
+GraphicsPipe::PreferredWindowThread 
+glxGraphicsPipe::get_preferred_window_thread() const {
+  return PWT_app;
+}
+
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: glxGraphicsPipe::make_output
 //     Function: glxGraphicsPipe::make_output
 //       Access: Protected, Virtual
 //       Access: Protected, Virtual

+ 3 - 0
panda/src/glxdisplay/glxGraphicsPipe.h

@@ -105,6 +105,9 @@ public:
 
 
   INLINE Cursor get_hidden_cursor();
   INLINE Cursor get_hidden_cursor();
 
 
+public:
+  virtual PreferredWindowThread get_preferred_window_thread() const;
+
 public:
 public:
   // Atom specifications.
   // Atom specifications.
   Atom _wm_delete_window;
   Atom _wm_delete_window;