-2006-08-08 Jonathan Pobst <monkey@jpobst.com>
+2006-08-08 Peter Dennis Bartok <pbartok@novell.com>
+
+ * ComboBox.cs: Added focus reflection for popup window
+ * XplatUIX11.cs:
+ - Removed transient setting for non-app windows for now, not sure it
+ was needed
+ - Fixed logic checking if we have captions when deciding
+ override_redirect, WS_CAPTION is two bits and a 0 check was not
+ sufficient
+ - Removed the WINDOW_TYPE stuff, it was unneeded and making things
+ complicated
+ * Form.cs:
+ - AddOwnedForm: Don't just add the form to the list, call the property
+ to ensure the driver is informed about the ownership as well
+ - CreateHandle: Set the TopMost status in the driver if we have an owner
+ * XplatUI.cs: Fixed debug statement
+
+2006-08-08 Jonathan Pobst <monkey@jpobst.com>
* ButtonRenderer.cs, CheckBoxRenderer.cs, ComboBoxRenderer.cs
- GroupBoxRenderer.cs, ProgressBarRenderer.cs, RadioButtonRenderer.cs, ScrollBarRenderer.cs, TabRenderer.cs, TextBoxRenderer.cs,
+ GroupBoxRenderer.cs, ProgressBarRenderer.cs, RadioButtonRenderer.cs,
+ ScrollBarRenderer.cs, TabRenderer.cs, TextBoxRenderer.cs,
TrackBarRenderer.cs: Make constructor private.
* ProfessionalColors.cs, ProfessionalColorTable.cs: Fix misnamed properties.
* ProfessionalColorTable.cs: Make properties virtual.
* NumericUpDown.cs (Value): Don't call OnValueChanged if the value
is not changing.
-2006-08-04 Jonathan Pobst <monkey@jpobst.com>
+2006-08-04 Jonathan Pobst <monkey@jpobst.com>
* ButtonRenderer.cs, CheckBoxRenderer.cs, ComboBoxRenderer.cs
GroupBoxRenderer.cs, ProfessionalColors.cs, ProfessionalColorTable.cs,
ProgressBarRenderer.cs, RadioButtonRenderer.cs, ScrollBarRenderer.cs,
{
if (owner.DropDownStyle == ComboBoxStyle.Simple && owner.Items.Count == 0)
return false;
-
+
HighlightedIndex = owner.SelectedIndex;
CalcListBoxArea ();
Refresh ();
}
+ protected override void WndProc(ref Message m) {
+ if (m.Msg == (int)Msg.WM_SETFOCUS) {
+ if (m.WParam != IntPtr.Zero) {
+ XplatUI.SetFocus(m.WParam);
+ }
+ }
+ base.WndProc (ref m);
+ }
+
#endregion Private Methods
}
}
}
public void AddOwnedForm(Form ownedForm) {
- owned_forms.Add(ownedForm);
+ ownedForm.Owner = this;
}
public void Close () {
if (icon != null) {
XplatUI.SetIcon(window.Handle, icon);
}
+
+ if ((owner != null) && (owner.IsHandleCreated)) {
+ XplatUI.SetTopmost(window.Handle, owner.window.Handle, true);
+ }
+
+ if (owned_forms.Count > 0) {
+ for (int i = 0; i < owned_forms.Count; i++) {
+ if (owned_forms[i].IsHandleCreated) {
+ XplatUI.SetTopmost(owned_forms[i].window.Handle, window.Handle, true);
+ }
+ }
+ }
+
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
internal static bool SupportsTransparency() {
#if DriverDebug
- Console.WriteLine("SupportsTransparency(): Called, result={1}", driver.SupportsTransparency());
+ Console.WriteLine("SupportsTransparency(): Called, result={0}", driver.SupportsTransparency());
#endif
return driver.SupportsTransparency();
}
client_rect = hwnd.ClientRect;
lock (XlibLock) {
XChangeProperty(DisplayHandle, hwnd.whole_window, NetAtoms[(int)NA._MOTIF_WM_HINTS], NetAtoms[(int)NA._MOTIF_WM_HINTS], 32, PropertyMode.Replace, ref mwmHints, 5);
-
- if (((cp.Style & (int)WindowStyles.WS_POPUP) != 0) && (hwnd.parent != null) && (hwnd.parent.whole_window != IntPtr.Zero)) {
+ if (((cp.Style & (int)WindowStyles.WS_POPUP) != 0) && (hwnd.parent != null) && (hwnd.parent.whole_window != IntPtr.Zero)) {
transient = true;
XSetTransientForHint(DisplayHandle, hwnd.whole_window, hwnd.parent.whole_window);
} else if ((cp.ExStyle & (int)WindowExStyles.WS_EX_APPWINDOW) == 0) {
- transient = true;
- XSetTransientForHint(DisplayHandle, hwnd.whole_window, FosterParent);
+// transient = true;
+// XSetTransientForHint(DisplayHandle, hwnd.whole_window, FosterParent);
}
if ((client_rect.Width < 1) || (client_rect.Height < 1)) {
XMoveResizeWindow(DisplayHandle, hwnd.client_window, -5, -5, 1, 1);
}
XChangeProperty(DisplayHandle, hwnd.whole_window, NetAtoms[(int)NA._NET_WM_STATE], (IntPtr)Atom.XA_ATOM, 32, PropertyMode.Replace, atoms, atom_count);
- if ((cp.ExStyle & (int)WindowExStyles.WS_EX_TOPMOST) != 0) {
- atom_count = 0;
- atoms[atom_count++] = NetAtoms[(int)NA._NET_WM_WINDOW_TYPE_DOCK].ToInt32();
- XChangeProperty(DisplayHandle, hwnd.whole_window, NetAtoms[(int)NA._NET_WM_WINDOW_TYPE], (IntPtr)Atom.XA_ATOM, 32, PropertyMode.Replace, atoms, atom_count);
- } else if (transient) {
- atom_count = 0;
-
- if ((cp.ExStyle & ((int)WindowExStyles.WS_EX_TOOLWINDOW)) != 0) {
- atoms[atom_count++] = NetAtoms[(int)NA._NET_WM_WINDOW_TYPE_DOCK].ToInt32();
- } else {
- atoms[atom_count++] = NetAtoms[(int)NA._NET_WM_WINDOW_TYPE_DIALOG].ToInt32();
- }
- XChangeProperty(DisplayHandle, hwnd.whole_window, NetAtoms[(int)NA._NET_WM_WINDOW_TYPE], (IntPtr)Atom.XA_ATOM, 32, PropertyMode.Replace, atoms, atom_count);
- }
-
atom_count = 0;
IntPtr[] atom_ptrs = new IntPtr[2];
-
atom_ptrs[atom_count++] = NetAtoms[(int)NA.WM_DELETE_WINDOW];
if ((cp.ExStyle & (int)WindowExStyles.WS_EX_CONTEXTHELP) != 0) {
atom_ptrs[atom_count++] = NetAtoms[(int)NA._NET_WM_CONTEXT_HELP];
// If we're a popup without caption we override the WM
if ((cp.Style & ((int)WindowStyles.WS_POPUP)) != 0) {
- if ((cp.Style & (int)WindowStyles.WS_CAPTION) == 0) {
+ if ((cp.Style & (int)WindowStyles.WS_CAPTION) != (int)WindowStyles.WS_CAPTION) {
Attributes.override_redirect = true;
ValueMask |= SetWindowValuemask.OverrideRedirect;
}
if ((cp.ExStyle & (int)WindowExStyles.WS_EX_TOPMOST) != 0) {
XSetTransientForHint (DisplayHandle, hwnd.whole_window, RootWindow);
} else if ((cp.ExStyle & (int)WindowExStyles.WS_EX_APPWINDOW) == 0) {
- XSetTransientForHint (DisplayHandle, hwnd.whole_window, FosterParent);
+// XSetTransientForHint (DisplayHandle, hwnd.whole_window, FosterParent);
}
SetWMStyles(hwnd, cp);