< prev index next >

src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp

Print this page
rev 60071 : 8211999: Window positioning bugs due to overlapping GraphicsDevice bounds (Windows/HiDPI)
Reviewed-by: XXX


 312                     style = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN;
 313                   if (state & java_awt_Frame_ICONIFIED) {
 314                       frame->setIconic(TRUE);
 315                   }
 316                 }
 317 
 318                 if (GetRTL()) {
 319                     exStyle |= WS_EX_RIGHT | WS_EX_LEFTSCROLLBAR;
 320                     if (GetRTLReadingOrder())
 321                         exStyle |= WS_EX_RTLREADING;
 322                 }
 323 
 324                 jint x = env->GetIntField(target, AwtComponent::xID);
 325                 jint y = env->GetIntField(target, AwtComponent::yID);
 326                 jint width = env->GetIntField(target, AwtComponent::widthID);
 327                 jint height = env->GetIntField(target, AwtComponent::heightID);
 328 
 329                 frame->CreateHWnd(env, L"",
 330                                   style,
 331                                   exStyle,
 332                                   0, 0, 0, 0,
 333                                   hwndParent,
 334                                   NULL,
 335                                   ::GetSysColor(COLOR_WINDOWTEXT),
 336                                   ::GetSysColor(COLOR_WINDOWFRAME),
 337                                   self);
 338                 /*
 339                  * Reshape here instead of during create, so that a
 340                  * WM_NCCALCSIZE is sent.
 341                  */
 342                 frame->Reshape(x, y, width, height);
 343             }
 344         }
 345     } catch (...) {
 346         env->DeleteLocalRef(target);
 347         env->DeleteLocalRef(cls);
 348         env->DeleteLocalRef(inputMethodWindowCls);
 349         throw;
 350     }
 351 
 352 done:
 353     env->DeleteLocalRef(target);
 354     env->DeleteLocalRef(cls);
 355     env->DeleteLocalRef(inputMethodWindowCls);
 356 
 357     return frame;
 358 }
 359 
 360 /*
 361  * Returns true if the frame is embedded into Internet Explorer.
 362  * The function checks the class name of the parent window of the embedded frame.




 312                     style = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN;
 313                   if (state & java_awt_Frame_ICONIFIED) {
 314                       frame->setIconic(TRUE);
 315                   }
 316                 }
 317 
 318                 if (GetRTL()) {
 319                     exStyle |= WS_EX_RIGHT | WS_EX_LEFTSCROLLBAR;
 320                     if (GetRTLReadingOrder())
 321                         exStyle |= WS_EX_RTLREADING;
 322                 }
 323 
 324                 jint x = env->GetIntField(target, AwtComponent::xID);
 325                 jint y = env->GetIntField(target, AwtComponent::yID);
 326                 jint width = env->GetIntField(target, AwtComponent::widthID);
 327                 jint height = env->GetIntField(target, AwtComponent::heightID);
 328 
 329                 frame->CreateHWnd(env, L"",
 330                                   style,
 331                                   exStyle,
 332                                   x, y, width, height,
 333                                   hwndParent,
 334                                   NULL,
 335                                   ::GetSysColor(COLOR_WINDOWTEXT),
 336                                   ::GetSysColor(COLOR_WINDOWFRAME),
 337                                   self);
 338                 frame->RecalcNonClient();




 339             }
 340         }
 341     } catch (...) {
 342         env->DeleteLocalRef(target);
 343         env->DeleteLocalRef(cls);
 344         env->DeleteLocalRef(inputMethodWindowCls);
 345         throw;
 346     }
 347 
 348 done:
 349     env->DeleteLocalRef(target);
 350     env->DeleteLocalRef(cls);
 351     env->DeleteLocalRef(inputMethodWindowCls);
 352 
 353     return frame;
 354 }
 355 
 356 /*
 357  * Returns true if the frame is embedded into Internet Explorer.
 358  * The function checks the class name of the parent window of the embedded frame.


< prev index next >