diff options
author | drewski207 <drewski207@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-12-09 14:33:57 +0000 |
---|---|---|
committer | drewski207 <drewski207@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-12-09 14:33:57 +0000 |
commit | 838792424beb2390dbb30bf786407be9a56b9660 (patch) | |
tree | ae14c7f022991a9e06ce45d7a2e76c9d13a1e147 /src/corelib/x11 | |
parent | c45272d642c7af5a63f471c3319eee213c2be0b0 (diff) | |
download | fpGUI-838792424beb2390dbb30bf786407be9a56b9660.tar.xz |
* Added fpgApplicationRemoveWindowFromModalStack so windows that are in the stach make sure to remove themselves when destroyed
* Added 2 new attributes to TWindowAttributes waUnblockableMessages, waX11SkipWMHints
* waUnblockableMessages is useful for allowing certain windows to still respond when other windows are modal
Diffstat (limited to 'src/corelib/x11')
-rw-r--r-- | src/corelib/x11/fpg_netlayer_x11.pas | 2 | ||||
-rw-r--r-- | src/corelib/x11/fpg_x11.pas | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/corelib/x11/fpg_netlayer_x11.pas b/src/corelib/x11/fpg_netlayer_x11.pas index b6d0dd70..6a2aeeb6 100644 --- a/src/corelib/x11/fpg_netlayer_x11.pas +++ b/src/corelib/x11/fpg_netlayer_x11.pas @@ -317,7 +317,7 @@ var I: Integer; ANetAtom: TNetAtomEnum; begin - if WindowGetPropertyAtom(FRootWindow, FNetAtoms[naSUPPORTED], AtomCount, Atoms) = False then;// Exit; + if WindowGetPropertyAtom(FRootWindow, FNetAtoms[naSUPPORTED], AtomCount, Atoms) = False then Exit; //WriteLn('RootWindow Atom Count = ',AtomCount); FillChar(FAtomSupported, SizeOf(Boolean) * Length(FAtomSupported), 0);; for I := 0 to AtomCount-1 do begin diff --git a/src/corelib/x11/fpg_x11.pas b/src/corelib/x11/fpg_x11.pas index 385b1361..6aad85d0 100644 --- a/src/corelib/x11/fpg_x11.pas +++ b/src/corelib/x11/fpg_x11.pas @@ -714,7 +714,7 @@ begin inherited Create(AParams); FIsInitialized := False; FDisplay := XOpenDisplay(PChar(aparams)); - + if FDisplay = nil then raise Exception.Create('fpGUI-X11: Could not open the display. Is your X11 server running?'); @@ -1050,7 +1050,7 @@ begin if xapplication.TopModalForm <> nil then begin ew := TfpgWindowImpl(WidgetParentForm(TfpgWidget(w))); - if (ew <> nil) and (xapplication.TopModalForm <> ew) then + if (ew <> nil) and (xapplication.TopModalForm <> ew) and (waUnblockableMessages in ew.WindowAttributes = False) then blockmsg := true; end; @@ -1128,7 +1128,7 @@ begin if xapplication.TopModalForm <> nil then begin ew := TfpgWindowImpl(WidgetParentForm(TfpgWidget(w))); - if (ew <> nil) and (xapplication.TopModalForm <> ew) then + if (ew <> nil) and (xapplication.TopModalForm <> ew) and (waUnblockableMessages in ew.WindowAttributes = False) then blockmsg := true; end; if not blockmsg then @@ -1163,7 +1163,7 @@ begin begin // This is ugly!!!!!!!!!!!!!!! ew := TfpgWindowImpl(WidgetParentForm(TfpgWidget(w))); - if (ew <> nil) and (xapplication.TopModalForm <> ew) then + if (ew <> nil) and (xapplication.TopModalForm <> ew) and (waUnblockableMessages in ew.WindowAttributes = False) then blockmsg := true; end; @@ -1372,7 +1372,7 @@ begin FillChar(attr, sizeof(attr), 0); mask := 0; - if FWindowType in [wtPopup] then + if (FWindowType in [wtPopup]) or (waX11SkipWMHints in FWindowAttributes) then begin attr.Override_Redirect := TBool(True); mask := CWOverrideRedirect; @@ -1465,7 +1465,7 @@ begin fpgApplication.netlayer.WindowSetType(FWinHandle, [nwtSplash]); // process Borderless forms - if ((FWindowType = wtWindow) or (FWindowType = wtModalForm)) and (waBorderless in FWindowAttributes) then + if ((FWindowType = wtWindow) or (FWindowType = wtModalForm)) and (waBorderless in FWindowAttributes) and not (waX11SkipWMHints in FWindowAttributes) then begin prop := X.None; prop := XInternAtom(xapplication.display, '_MOTIF_WM_INFO', longbool(0)); |