SendMessage(hwnd.client_window, Msg.WM_WINDOWPOSCHANGED, IntPtr.Zero, IntPtr.Zero);
Control ctrl = Control.FromHandle (handle);
- Size TranslatedSize = TranslateWindowSizeToQuartzWindowSize (ctrl.GetCreateParams (), new Size (width, height));
+ CreateParams cp = ctrl.GetCreateParams ();
+ Size TranslatedSize = TranslateWindowSizeToQuartzWindowSize (cp, new Size (width, height));
Carbon.Rect rect = new Carbon.Rect ();
if (WindowMapping [hwnd.Handle] != null) {
- SetRect (ref rect, (short)x, (short)(y+MenuBarHeight), (short)(x+TranslatedSize.Width), (short)(y+MenuBarHeight+TranslatedSize.Height));
+ if (StyleSet (cp.Style, WindowStyles.WS_POPUP)) {
+ SetRect (ref rect, (short)x, (short)y, (short)(x+TranslatedSize.Width), (short)(y+TranslatedSize.Height));
+ } else {
+ SetRect (ref rect, (short)x, (short)(y+MenuBarHeight), (short)(x+TranslatedSize.Width), (short)(y+MenuBarHeight+TranslatedSize.Height));
+ }
SetWindowBounds ((IntPtr) WindowMapping [hwnd.Handle], 33, ref rect);
Carbon.HIRect frame_rect = new Carbon.HIRect (0, 0, TranslatedSize.Width, TranslatedSize.Height);
HIViewSetFrame (hwnd.whole_window, ref frame_rect);