mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-01 08:56:13 +02:00
MG: in design mode the mouse cursor is now also set for hidden gdkwindows
git-svn-id: trunk@794 -
This commit is contained in:
parent
d526439109
commit
f0e8121019
@ -852,6 +852,21 @@ end;
|
|||||||
Sets the cursor for a widget
|
Sets the cursor for a widget
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure SetCursor(AWinControl : TWinControl);
|
procedure SetCursor(AWinControl : TWinControl);
|
||||||
|
|
||||||
|
procedure SetDesigningCursor(AWindow: PGdkWindow);
|
||||||
|
var
|
||||||
|
ChildWindows, ListEntry: PGList;
|
||||||
|
begin
|
||||||
|
gdk_window_set_cursor(AWindow, Cursor_StdArrow);
|
||||||
|
ChildWindows:=gdk_window_get_children(AWindow);
|
||||||
|
ListEntry:=ChildWindows;
|
||||||
|
while ListEntry<>nil do begin
|
||||||
|
SetDesigningCursor(PGdkWindow(ListEntry^.Data));
|
||||||
|
ListEntry:=ListEntry^.Next;
|
||||||
|
end;
|
||||||
|
g_list_free(ChildWindows);
|
||||||
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
AWidget, FixWidget: PGtkWidget;
|
AWidget, FixWidget: PGtkWidget;
|
||||||
AWindow: PGdkWindow;
|
AWindow: PGdkWindow;
|
||||||
@ -868,8 +883,9 @@ begin
|
|||||||
AWindow:=AWidget^.Window;
|
AWindow:=AWidget^.Window;
|
||||||
if AWindow=nil then exit;
|
if AWindow=nil then exit;
|
||||||
|
|
||||||
|
if AWinControl is TEdit then writeln('AAA1 SetCursor ',AWinControl.Name,' ',csDesigning in AWinControl.ComponentState);
|
||||||
if csDesigning in AWinControl.ComponentState then begin
|
if csDesigning in AWinControl.ComponentState then begin
|
||||||
gdk_window_set_cursor (AWindow, Cursor_Arrow);
|
SetDesigningCursor(AWindow);
|
||||||
end else begin
|
end else begin
|
||||||
case AWinControl.Cursor of
|
case AWinControl.Cursor of
|
||||||
crAppStart : gdk_window_set_cursor (AWindow, Cursor_Watch);
|
crAppStart : gdk_window_set_cursor (AWindow, Cursor_Watch);
|
||||||
@ -1479,6 +1495,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.49 2002/06/21 17:54:24 lazarus
|
||||||
|
MG: in design mode the mouse cursor is now also set for hidden gdkwindows
|
||||||
|
|
||||||
Revision 1.48 2002/06/21 16:59:16 lazarus
|
Revision 1.48 2002/06/21 16:59:16 lazarus
|
||||||
MG: TControl.Cursor is now set, reduced auto reaction of widgets in design mode
|
MG: TControl.Cursor is now set, reduced auto reaction of widgets in design mode
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user