mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-25 04:23:09 +02:00
partly fixed gtk2 mouse offsets;
added new includes to gtk2 lpk git-svn-id: trunk@4702 -
This commit is contained in:
parent
230f4d80cb
commit
d1b6f316f9
@ -854,6 +854,15 @@ procedure TGtkObject.SendCachedGtkMessages;
|
||||
|
||||
GtkLeft:=MainWidget^.Allocation.X;
|
||||
GtkTop:=MainWidget^.Allocation.Y;
|
||||
|
||||
{$Ifdef GTK2}
|
||||
if GTK_WIDGET_NO_WINDOW(MainWidget) and GTK_WIDGET_NO_WINDOW(MainWidget^.Parent)
|
||||
// and (not GtkWidgetIsA(MainWidget,GTKAPIWidget_GetType))
|
||||
then begin
|
||||
Dec(GtkLeft, MainWidget^.parent^.Allocation.X);
|
||||
Dec(GtkTop, MainWidget^.parent^.Allocation.Y);
|
||||
end;
|
||||
{$EndIf}
|
||||
GtkWidth:=MainWidget^.Allocation.Width;
|
||||
if GtkWidth<0 then GtkWidth:=0;
|
||||
GtkHeight:=MainWidget^.Allocation.Height;
|
||||
@ -8445,6 +8454,10 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.432 2003/10/06 16:13:52 ajgenius
|
||||
partly fixed gtk2 mouse offsets;
|
||||
added new includes to gtk2 lpk
|
||||
|
||||
Revision 1.431 2003/10/06 10:50:10 mattias
|
||||
added recursion to InvalidateClientRectCache
|
||||
|
||||
|
@ -2153,6 +2153,13 @@ begin
|
||||
if ClientWindow<>nil then begin
|
||||
BeginGDKErrorTrap;
|
||||
gdk_window_get_origin(ClientWindow,@Result.X,@Result.Y);
|
||||
{$Ifdef GTK2}
|
||||
if GTK_WIDGET_NO_WINDOW(ClientWidget)
|
||||
then begin
|
||||
Inc(Result.X, ClientWidget^.Allocation.X);
|
||||
Inc(Result.Y, ClientWidget^.Allocation.Y);
|
||||
end;
|
||||
{$EndIf}
|
||||
EndGDKErrorTrap;
|
||||
exit;
|
||||
end;
|
||||
@ -4899,6 +4906,10 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.215 2003/10/06 16:13:52 ajgenius
|
||||
partly fixed gtk2 mouse offsets;
|
||||
added new includes to gtk2 lpk
|
||||
|
||||
Revision 1.214 2003/10/03 01:25:01 ajgenius
|
||||
add more gtk1i<->gtk2 key & event wrappers,
|
||||
move more GTK2 workarounds from gtk to gtk2 interface,
|
||||
|
@ -3609,10 +3609,24 @@ begin
|
||||
inc(MainOrigin.X,Widget^.Allocation.X);
|
||||
inc(MainOrigin.Y,Widget^.Allocation.Y);
|
||||
end;
|
||||
if ClientWindow<>nil then
|
||||
gdk_window_get_origin(ClientWindow,@ClientOrigin.X,@ClientOrigin.Y)
|
||||
else begin
|
||||
if ClientWindow<>nil then begin
|
||||
{$Ifdef GTK2}
|
||||
if GTK_WIDGET_NO_WINDOW(ClientWidget)
|
||||
then begin
|
||||
ClientOrigin.X := ClientWidget^.Allocation.X;
|
||||
ClientOrigin.Y := ClientWidget^.Allocation.Y;
|
||||
end else
|
||||
{$EndIf}
|
||||
gdk_window_get_origin(ClientWindow,@ClientOrigin.X,@ClientOrigin.Y);
|
||||
end else begin
|
||||
// client widget not realized
|
||||
{$Ifdef GTK2}
|
||||
if GTK_WIDGET_NO_WINDOW(ClientWidget)
|
||||
then begin
|
||||
ClientOrigin.X := ClientWidget^.Allocation.X;
|
||||
ClientOrigin.Y := ClientWidget^.Allocation.Y;
|
||||
end else
|
||||
{$EndIf}
|
||||
ClientOrigin:=MainOrigin;
|
||||
end;
|
||||
ARect.Left:=ClientOrigin.X-MainOrigin.X;
|
||||
@ -8951,6 +8965,10 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.290 2003/10/06 16:13:52 ajgenius
|
||||
partly fixed gtk2 mouse offsets;
|
||||
added new includes to gtk2 lpk
|
||||
|
||||
Revision 1.289 2003/10/02 18:18:32 ajgenius
|
||||
buffer cs_opaque ExtTextOut blocks to help prevent extensive flickering
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Files Count="20">
|
||||
<Files Count="22">
|
||||
<Item1>
|
||||
<Filename Value="interfaces.pas"/>
|
||||
<UnitName Value="Interfaces"/>
|
||||
@ -94,6 +94,14 @@
|
||||
<Filename Value="../gtk/keymap.pp"/>
|
||||
<UnitName Value="KeyMap"/>
|
||||
</Item20>
|
||||
<Item21>
|
||||
<Filename Value="gtk2winapi.inc"/>
|
||||
<Type Value="Include"/>
|
||||
</Item21>
|
||||
<Item22>
|
||||
<Filename Value="gtk2object.inc"/>
|
||||
<Type Value="Include"/>
|
||||
</Item22>
|
||||
</Files>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
<RequiredPkgs Count="2">
|
||||
|
Loading…
Reference in New Issue
Block a user