Browse Source

some test code for ime_window to disappear

Asad M. Zaman 22 years ago
parent
commit
85ff1a83db

+ 2 - 1
panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx

@@ -904,7 +904,8 @@ init_shader(ShaderType stype,DXShaderHandle &hShader,string *pFname) {
 void DXGraphicsStateGuardian8::
 void DXGraphicsStateGuardian8::
 support_overlay_window(bool flag) {
 support_overlay_window(bool flag) {
   // How is this supposed to be done in DX8?
   // How is this supposed to be done in DX8?
-
+  //_bDXisReady = !flag;
+  //dxgsg8_cat.debug() << "Set DxReady to " << _bDXisReady << "\n";
   /*
   /*
   if (_overlay_windows_supported && !flag) {
   if (_overlay_windows_supported && !flag) {
     // Disable support for overlay windows.
     // Disable support for overlay windows.

+ 11 - 0
panda/src/dxgsg8/wdxGraphicsWindow8.cxx

@@ -255,6 +255,17 @@ void wdxGraphicsWindow8::
 end_flip() {
 end_flip() {
   if (_dxgsg != (DXGraphicsStateGuardian8 *)NULL && is_active()) {
   if (_dxgsg != (DXGraphicsStateGuardian8 *)NULL && is_active()) {
     //    wdxdisplay8_cat.debug() << "current swapchain from end_flip is " << _wcontext.pSwapChain << "\n";
     //    wdxdisplay8_cat.debug() << "current swapchain from end_flip is " << _wcontext.pSwapChain << "\n";
+    //    if (DX_IS_READY || !is_fullscreen())
+    /* Test code
+    HWND ime_hwnd = get_ime_hwnd();
+    if (ime_hwnd) {
+      int t = SendMessage(ime_hwnd, WM_PAINT, (WPARAM)GetDC(_hWnd), PRF_CLIENT);
+      if (t)
+        wdxdisplay8_cat.debug() << "SendMessage failed for " << ime_hwnd << "\n";
+      else
+        wdxdisplay8_cat.debug() << "SendMessage succeeded for " << ime_hwnd << "\n";
+    }
+    */
     _dxgsg->show_frame();
     _dxgsg->show_frame();
   }
   }
   GraphicsWindow::end_flip();
   GraphicsWindow::end_flip();