internal bool zombie; /* X11 only flag. true if the X windows have been destroyed but we haven't been Disposed */
internal Region user_clip;
internal static Bitmap bmp = new Bitmap(1, 1, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
+ internal static Graphics bmp_g = Graphics.FromImage (bmp);
internal XEventQueue queue;
+ internal bool no_activate; // For Win32, popup windows will not steal focus
+ internal WindowExStyles initial_ex_style;
#endregion // Local Variables
+ // locks for some operations (used in XplatUIX11.cs)
+ internal object configure_lock = new object ();
+ internal object expose_lock = new object ();
+
#region Constructors and destructors
public Hwnd() {
x = 0;
#endregion
#region Static Methods
- public void SetObjectWindow(Hwnd obj, IntPtr window) {
- windows[window] = obj;
- }
-
public static Hwnd ObjectFromWindow(IntPtr window) {
Hwnd rv;
lock (windows) {
if (menu != null) {
int menu_height = menu.Rect.Height;
- if (menu_height == 0) {
- Graphics g;
-
- g = Graphics.FromImage(bmp);
- menu_height = ThemeEngine.Current.CalcMenuBarSize(g, menu, client_rect.Width);
- g.Dispose();
- }
+ if (menu_height == 0)
+ menu_height = ThemeEngine.Current.CalcMenuBarSize(bmp_g, menu, client_rect.Width);
rect.Y -= menu_height;
rect.Height += menu_height;
zombie = false;
- lock (windows) {
- if (windows[client_window] == null) {
- windows[client_window] = this;
+ if (client_window != IntPtr.Zero) {
+ lock (windows) {
+ if (windows[client_window] == null) {
+ windows[client_window] = this;
+ }
}
}
}
get {
return expose_pending;
}
-
- set {
- expose_pending = value;
- }
}
public IntPtr Handle {
get {
return nc_expose_pending;
}
-
- set {
- nc_expose_pending = value;
- }
}
public Hwnd Parent {
zombie = false;
- lock (windows) {
- if (windows[whole_window] == null) {
- windows[whole_window] = this;
+ if (whole_window != IntPtr.Zero) {
+ lock (windows) {
+ if (windows[whole_window] == null) {
+ windows[whole_window] = this;
+ }
}
}
}