The attached patch makes SetFormFullScreen work for GTK2 apps as well as GTK1
I did not yet port GrabMouseToForm or GrabKeyboardToForm - mostly because I honestly don't know how yet. A.J. -- "80% Of a hardware engineer's job is application of the uncertainty principle. 80% of a software engineer's job is pretending this isn't so." A.J. Venter Chief Software Architect OpenLab International | +27 83 455 99 78 (South Africa) http://www.getopenlab.com | 086 654 2898 (Fax) http://www.silentcoder.co.za | +55 118 162 2079 (Brazil) GPG Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x27CFFE5A
Index: ide/revision.inc =================================================================== --- ide/revision.inc (revision 10034) +++ ide/revision.inc (working copy) @@ -1,2 +1,2 @@ // Created by Svn2RevisionInc -const RevisionStr = '10002M'; +const RevisionStr = '10034M'; Index: lcl/interfaces/gtk/gtkproc.inc =================================================================== --- lcl/interfaces/gtk/gtkproc.inc (revision 10034) +++ lcl/interfaces/gtk/gtkproc.inc (working copy) @@ -981,7 +981,6 @@ end; procedure SetWindowFullScreen(AForm: TCustomForm; const AValue: Boolean); -{$IFDEF HasGtkX} var XDisplay: PDisplay; XScreen: PScreen; @@ -995,6 +994,12 @@ _NET_WM_STATE_ATOMS: array [0..2] of Integer; I: Integer; begin + {$IFDEF GTK2} + If AValue then + GTK_Window_FullScreen(PGTKWindow(AForm.Handle)) else + GTK_Window_UnFullScreen(PGTKWindow(AForm.Handle)); + {$ENDIF} + {$IFDEF GTK1} XDisplay := gdk_display; XScreen := XDefaultScreenOfDisplay(xdisplay); XRootWindow := XRootWindowOfScreen(xscreen); @@ -1018,12 +1023,8 @@ XSendEvent(XDisplay, XRootWindow, False, SubstructureNotifyMask, @XEvent); end; + {$ENDIF} end; -{$ELSE} -begin - RaiseGDBException('not implemented'); -end; -{$ENDIF} procedure GrabKeyBoardToForm(AForm: TCustomForm); begin
pgpfuY7I5JT87.pgp
Description: PGP signature