System.Windows.Forms.XplatUICarbon.TranslateWindowSizeToQuartzWindowSize C# (CSharp) Method

TranslateWindowSizeToQuartzWindowSize() static private method

static private TranslateWindowSizeToQuartzWindowSize ( CreateParams cp, Size size ) : Size
cp CreateParams
size System.Drawing.Size
return System.Drawing.Size
		internal static Size TranslateWindowSizeToQuartzWindowSize (CreateParams cp, Size size) {
			/* From XplatUIX11
			 * If this is a form with no window manager, X is handling all the border and caption painting
			 * so remove that from the area (since the area we set of the window here is the part of the window 
			 * we're painting in only)
			 */
			Form form = cp.control as Form;
			if (form != null && (form.window_manager == null || cp.IsSet (WindowExStyles.WS_EX_TOOLWINDOW))) {
				Hwnd.Borders borders = Hwnd.GetBorders (cp, null);
				Size qsize = size;

				qsize.Width -= borders.left + borders.right;
				qsize.Height -= borders.top + borders.bottom; 
				
				size = qsize;
			}

			if (size.Height == 0)
				size.Height = 1;
			if (size.Width == 0)
				size.Width = 1;
			return size;
		}
			

Same methods

XplatUICarbon::TranslateWindowSizeToQuartzWindowSize ( CreateParams cp ) : Size
XplatUICarbon