Changeset 493 for trunk


Ignore:
Timestamp:
Dec 29, 2023, 2:09:06 AM (20 months ago)
Author:
ataylor
Message:

Undo TForm changes (rollback r492). Opening when window is system-modal now
simply clears system-modality for the lifetime of the NewView application, and
restores it on exit.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/NewView/MainForm.pas

    r492 r493  
    521521
    522522    // ALT 2023-12-24
    523     Procedure CheckSetSysModal(FormWindow: TForm);
    524     Procedure CheckUnsetSysModal;
     523    Procedure CheckSaveSysModal(FormWindow: TForm);
     524    Procedure CheckReturnSysModal;
    525525
    526526    // Bookmarks ------------------------------------------
     
    37463746  end;
    37473747  }
    3748   CheckUnsetSysModal;
     3748  CheckReturnSysModal;
    37493749
    37503750  // TODO rbri maybe we have to do this
     
    43794379  }
    43804380  // [ALT 2023-12-26] move above to procedure
    4381   CheckSetSysModal(Self);
     4381  CheckSaveSysModal(Self);
    43824382
    43834383  LogEvent(LogStartup, 'RUN PROGRAM');
     
    47014701    EndUpdate;
    47024702  end;
    4703 //  CheckSetSysModal(InformationForm);
     4703//  CheckSaveSysModal(InformationForm);
    47044704  InformationForm.ShowModal;
    4705 //  CheckSetSysModal(Self);
     4705//  CheckSaveSysModal(Self);
    47064706End;
    47074707
     
    72177217end;
    72187218
    7219 
    7220 Procedure TMainForm.CheckSetSysModal(FormWindow: TForm);
     7219Procedure TMainForm.CheckSaveSysModal(FormWindow: TForm);
    72217220begin
    72227221  // Override any existing system-modal state
    72237222  if g_LastSysModalWindow <> NULLHANDLE then
    72247223  begin
    7225     WinSetSysModalWindow( HWND_DESKTOP, FormWindow.Frame.Handle );
    7226   end;
    7227 end;
    7228 
    7229 
    7230 Procedure TMainForm.CheckUnsetSysModal;
     7224    //WinSetSysModalWindow( HWND_DESKTOP, FormWindow.Frame.Handle );
     7225    WinSetSysModalWindow( HWND_DESKTOP, NULLHANDLE );
     7226    WinSetActiveWindow( HWND_DESKTOP, FormWindow.Frame.Handle );
     7227  end;
     7228end;
     7229
     7230Procedure TMainForm.CheckReturnSysModal;
    72317231begin
    72327232  // Restore any previous system-modal window state
     
    72347234  begin
    72357235    WinSetSysModalWindow( HWND_DESKTOP, g_LastSysModalWindow );
     7236    WinSetActiveWindow( HWND_DESKTOP, g_LastSysModalWindow );
    72367237  end;
    72377238end;
  • trunk/NewView/VersionUnit.pas

    r492 r493  
    1717
    1818const
    19   Version =        'V2.19.8d';  // $SS_REQUIRE_NEW_VERSION$
    20   BldLevelVersion = '2.19.8d';  // Embedded for IBM BLDLEVEL tool
     19  Version =        'V2.19.8e';  // $SS_REQUIRE_NEW_VERSION$
     20  BldLevelVersion = '2.19.8e';  // Embedded for IBM BLDLEVEL tool
    2121  CopyrightMsg = 'Copyright 2005 Aaron Lawrence; 2006-2019 Ronald Brill';
    2222  LicenseMsg   = 'Licensed under the GNU Public License';
  • trunk/Sibyl/SPCC/FORMS.PAS

    r492 r493  
    77 º                                                                          º
    88 ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ}
    9 
     9                             
    1010Unit Forms;
    1111
     
    20572057         FOnCreate:TNotifyEvent;
    20582058         FOnDestroy:TNotifyEvent;
    2059          FSysModalWin:HWnd;      // [ALT 2023-12-27]
    20602059         Procedure CMRelease(Var Msg:TMessage); Message CM_RELEASE;
    20612060         Procedure CMEndModalState(Var Msg:TMessage); Message CM_ENDMODALSTATE;
     
    24652464// This is not functionally needed but prevents unnecessary GpiDeleteSetId calls
    24662465// which fail and therefore make it more difficult to test for real problems.
    2467 // Probably not safe to leave in due to incompatibility between components
     2466// Probably not safe to leave in due to incompatibility between components 
    24682467// and IDE  - AaronL
    24692468//         FFontSet:boolean;
     
    54175416          Begin
    54185417               FFont.Destroy;
    5419                FFont := nil; // AaronL - need to set ffont to nil
     5418               FFont := nil; // AaronL - need to set ffont to nil 
    54205419          End;
    54215420     End;
     
    62146213   CurrentModalFrame:HWND=0;
    62156214   DesktopHWND:HWND=0;
    6216    ModalList:TList=NIL;
     6215   ModalList:TList=NIL;   
    62176216
    62186217{$HINTS OFF}
     
    62756274Begin
    62766275     MyPID := GetCurrentProcessID;
    6277 
     6276     
    62786277     // Get the count of switch list items
    62796278     SwitchListCount := WinQuerySwitchList( AppHandle, nil, 0 );
     
    62826281     // Allocate buffer
    62836282     GetMem( pSwitchListInfo, BufferSize );
    6284 
     6283     
    62856284     // Call WinQuerySwitchList again to get the switch list items
    62866285     WinQuerySwitchList( AppHandle, pSwitchListInfo^, BufferSize );
    6287 
     6286     
    62886287     for i := 0 to SwitchListCount - 1 do
    62896288     begin
     
    62946293                    // This switch entry is for this application
    62956294                    if swctl.hwnd = Exclude.FFrame.Handle then
    6296                          continue;
     6295                         continue;                   
    62976296                    // so show/hide it
    62986297                    if Show then
     
    63026301                    WinChangeSwitchEntry( hswitch,
    63036302                                          swctl );
    6304 
     6303                                         
    63056304               end;
    63066305          end;
     
    79667965          If OnDismissDlg <> Nil Then OnDismissDlg(Self);
    79677966          If FModalResult <> cmNull Then EndModalState;
    7968 
    7969           // [20231227 ALT] Restore any previous system-modal window
    7970           if FSysModalWin <> NULLHANDLE then
    7971               WinSetSysModalWindow( HWND_DESKTOP, FSysModalWin );
    79727967     End;
    79737968End;
     
    85138508     Show;
    85148509     BringToFront;
    8515 
    8516      // [ALT 20231227]
    8517      FSysModalWin := WinQuerySysModalWindow( HWND_DESKTOP );
    8518      if FSysModalWin <> NULLHANDLE then
    8519           WinSetSysModalWindow( HWND_DESKTOP, Frame.Handle );
    85208510
    85218511again:
Note: See TracChangeset for help on using the changeset viewer.