gtk2 intf: fullscreen modus for forms from A.J. Venter

git-svn-id: trunk@10035 -
This commit is contained in:
mattias 2006-10-04 17:21:32 +00:00
parent 11b49e5f01
commit 181e58139c
2 changed files with 8 additions and 7 deletions

View File

@ -1,2 +1,2 @@
// Created by Svn2RevisionInc
const RevisionStr = '10002M';
const RevisionStr = '10034M';

View File

@ -981,7 +981,6 @@ begin
end;
procedure SetWindowFullScreen(AForm: TCustomForm; const AValue: Boolean);
{$IFDEF HasGtkX}
var
XDisplay: PDisplay;
XScreen: PScreen;
@ -995,6 +994,12 @@ var
_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 @@ begin
XSendEvent(XDisplay, XRootWindow, False, SubstructureNotifyMask, @XEvent);
end;
{$ENDIF}
end;
{$ELSE}
begin
RaiseGDBException('not implemented');
end;
{$ENDIF}
procedure GrabKeyBoardToForm(AForm: TCustomForm);
begin