mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 13:09:28 +02:00
next try to fix the gtk1 crashing on focussing a window from Andrew Haines
git-svn-id: trunk@6996 -
This commit is contained in:
parent
5ec0ba3595
commit
4442c43d56
@ -323,10 +323,6 @@ end;
|
||||
|
||||
procedure TCustomBarChart.BeginUpdate;
|
||||
begin
|
||||
if FUpdateCount=0 then begin
|
||||
Canvas.Brush.Color:=Color;
|
||||
Canvas.FillRect(GetClientRect);
|
||||
end;
|
||||
Inc(FUpdateCount);
|
||||
end;
|
||||
|
||||
|
@ -1159,15 +1159,21 @@ procedure GDK_WINDOW_ACTIVATE(Window: PGdkWindowPrivate);
|
||||
var
|
||||
XDisplay: PDisplay;
|
||||
XScreen: PScreen;
|
||||
XRootWindow,
|
||||
XWindow: TWindow;
|
||||
XEvent: TXClientMessageEvent;
|
||||
aXRootWindow,
|
||||
XWindow: x.TWindow;
|
||||
XEvent: xlib.TXClientMessageEvent;
|
||||
_NET_ACTIVE_WINDOW: Integer;
|
||||
begin
|
||||
if (Window=nil) or (gdk.destroyed(Window^)<>0) then exit;
|
||||
|
||||
XDisplay := GDK_WINDOW_XDISPLAY (Window);
|
||||
if XDisplay=nil then exit;
|
||||
XScreen := XDefaultScreenOfDisplay(xdisplay);
|
||||
XRootWindow := XRootWindowOfScreen(xscreen);
|
||||
if XScreen=nil then exit;
|
||||
aXRootWindow := XRootWindowOfScreen(xscreen);
|
||||
if aXRootWindow=0 then exit;
|
||||
XWindow := GDK_WINDOW_XWINDOW (Window);
|
||||
if XWindow=0 then exit;
|
||||
|
||||
_NET_ACTIVE_WINDOW := XInternAtom(xdisplay, '_NET_ACTIVE_WINDOW', false);
|
||||
|
||||
@ -1179,7 +1185,7 @@ begin
|
||||
XEvent.data.l[1] := CurrentTime;
|
||||
XEvent.data.l[1] := 0; // Applications current active window
|
||||
|
||||
XSendEvent(XDisplay, XRootWindow, False, SubstructureNotifyMask, @XEvent);
|
||||
XSendEvent(XDisplay, aXRootWindow, False, SubstructureNotifyMask, @XEvent);
|
||||
end;
|
||||
|
||||
procedure GDK_WINDOW_MAXIMIZE(Window: PGdkWindowPrivate);
|
||||
|
@ -224,7 +224,9 @@ begin
|
||||
FormWidget:=PGtkWidget(AForm.Handle);
|
||||
FormWindow:=PGdkWindowPrivate(FormWidget^.window);
|
||||
if FormWindow<>nil then begin
|
||||
{ $IFDEF EnableGtkWindowFocus}
|
||||
GDK_WINDOW_ACTIVATE(FormWindow);
|
||||
{ $ENDIF}
|
||||
end;
|
||||
{$ENDIF}
|
||||
{$ifdef gtk2}
|
||||
@ -8985,6 +8987,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.415 2005/03/20 09:35:47 mattias
|
||||
next try to fix the gtk1 crashing on focussing a window from Andrew Haines
|
||||
|
||||
Revision 1.414 2005/03/19 09:17:20 mattias
|
||||
gtk1: minimizing windows, missing: window state events from Andrew Haines
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user