mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 06:19:44 +02:00
lcl: revert r52377 #a7f5af9c78, it collided with Gtk2 WS code.
git-svn-id: trunk@52380 -
This commit is contained in:
parent
735b948b78
commit
92c16d5513
@ -176,7 +176,7 @@ type
|
|||||||
TCaption = TTranslateString;
|
TCaption = TTranslateString;
|
||||||
TCursor = -32768..32767;
|
TCursor = -32768..32767;
|
||||||
|
|
||||||
TFormStyle = (fsNormal, fsMDIChild, fsMDIForm, fsStayOnTop, fsSplash, fsSystemStayOnTop, fsIgnoreMouseEvents);
|
TFormStyle = (fsNormal, fsMDIChild, fsMDIForm, fsStayOnTop, fsSplash, fsSystemStayOnTop);
|
||||||
TFormBorderStyle = (bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow,
|
TFormBorderStyle = (bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow,
|
||||||
bsSizeToolWin);
|
bsSizeToolWin);
|
||||||
TBorderStyle = bsNone..bsSingle;
|
TBorderStyle = bsNone..bsSingle;
|
||||||
@ -2972,7 +2972,7 @@ begin
|
|||||||
if Frm=nil then
|
if Frm=nil then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
if Frm.FormStyle <> fsIgnoreMouseEvents then
|
if Frm.Perform(WM_NCHITTEST, 0, 0) <> HTTRANSPARENT then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
Handle := 0;
|
Handle := 0;
|
||||||
@ -2985,7 +2985,7 @@ begin
|
|||||||
NewFrm := Screen.CustomFormsZOrdered[I];
|
NewFrm := Screen.CustomFormsZOrdered[I];
|
||||||
if (NewFrm<>Frm)
|
if (NewFrm<>Frm)
|
||||||
and PtInRect(NewFrm.BoundsRect, MousePos)
|
and PtInRect(NewFrm.BoundsRect, MousePos)
|
||||||
and (NewFrm.FormStyle <> fsIgnoreMouseEvents)
|
and (NewFrm.Perform(WM_NCHITTEST, 0, 0) <> HTTRANSPARENT)
|
||||||
then
|
then
|
||||||
Break;
|
Break;
|
||||||
|
|
||||||
|
@ -508,7 +508,6 @@ type
|
|||||||
procedure CMActivate(var Message: TLMessage); message CM_ACTIVATE;
|
procedure CMActivate(var Message: TLMessage); message CM_ACTIVATE;
|
||||||
procedure CMDeactivate(var Message: TLMessage); message CM_DEACTIVATE;
|
procedure CMDeactivate(var Message: TLMessage); message CM_DEACTIVATE;
|
||||||
procedure CMShowingChanged(var Message: TLMessage); message CM_SHOWINGCHANGED;
|
procedure CMShowingChanged(var Message: TLMessage); message CM_SHOWINGCHANGED;
|
||||||
procedure WMNCHitTest(var Message: TLMessage); message LM_NCHITTEST;
|
|
||||||
protected
|
protected
|
||||||
FActionLists: TList; // keep this TList for Delphi compatibility
|
FActionLists: TList; // keep this TList for Delphi compatibility
|
||||||
FFormBorderStyle: TFormBorderStyle;
|
FFormBorderStyle: TFormBorderStyle;
|
||||||
@ -859,6 +858,7 @@ type
|
|||||||
procedure SetHintRectAdjust(AValue: TRect);
|
procedure SetHintRectAdjust(AValue: TRect);
|
||||||
protected
|
protected
|
||||||
class procedure WSRegisterClass; override;
|
class procedure WSRegisterClass; override;
|
||||||
|
procedure WMNCHitTest(var Message: TLMessage); message LM_NCHITTEST;
|
||||||
procedure ActivateSub;
|
procedure ActivateSub;
|
||||||
procedure DoShowWindow; override;
|
procedure DoShowWindow; override;
|
||||||
procedure UpdateRegion;
|
procedure UpdateRegion;
|
||||||
|
@ -2214,7 +2214,7 @@ begin
|
|||||||
if (FMainForm = nil)
|
if (FMainForm = nil)
|
||||||
and (FCreatingForm=AForm)
|
and (FCreatingForm=AForm)
|
||||||
and (not (AppDestroying in FFlags))
|
and (not (AppDestroying in FFlags))
|
||||||
and not (AForm.FormStyle in [fsMDIChild, fsSplash, fsIgnoreMouseEvents])
|
and not (AForm.FormStyle in [fsMDIChild, fsSplash])
|
||||||
then
|
then
|
||||||
FMainForm := AForm;
|
FMainForm := AForm;
|
||||||
end;
|
end;
|
||||||
|
@ -728,14 +728,6 @@ begin
|
|||||||
Application.QueueAsyncCall(@Moved, 0)
|
Application.QueueAsyncCall(@Moved, 0)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomForm.WMNCHitTest(var Message: TLMessage);
|
|
||||||
begin
|
|
||||||
if FormStyle=fsIgnoreMouseEvents then
|
|
||||||
Message.Result := HTTRANSPARENT
|
|
||||||
else
|
|
||||||
inherited;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCustomForm.Moved(Data: PtrInt);
|
procedure TCustomForm.Moved(Data: PtrInt);
|
||||||
begin
|
begin
|
||||||
if WindowState = wsNormal then
|
if WindowState = wsNormal then
|
||||||
@ -1957,10 +1949,10 @@ Begin
|
|||||||
FFormStyle := Value;
|
FFormStyle := Value;
|
||||||
Include(FFormState, fsFormStyleChanged);
|
Include(FFormState, fsFormStyleChanged);
|
||||||
|
|
||||||
if FFormStyle in [fsSplash, fsIgnoreMouseEvents] then
|
if FFormStyle = fsSplash then
|
||||||
BorderStyle := bsNone
|
BorderStyle := bsNone
|
||||||
else
|
else
|
||||||
if OldFormStyle in [fsSplash, fsIgnoreMouseEvents] then
|
if OldFormStyle = fsSplash then
|
||||||
BorderStyle := bsSizeable;
|
BorderStyle := bsSizeable;
|
||||||
if HandleAllocated then
|
if HandleAllocated then
|
||||||
TWSCustomFormClass(WidgetSetClass).SetFormStyle(Self, Value, OldFormStyle);
|
TWSCustomFormClass(WidgetSetClass).SetFormStyle(Self, Value, OldFormStyle);
|
||||||
|
@ -30,7 +30,7 @@ begin
|
|||||||
Canvas.Font := Screen.HintFont;
|
Canvas.Font := Screen.HintFont;
|
||||||
Canvas.Brush.Style := bsClear;
|
Canvas.Brush.Style := bsClear;
|
||||||
FAlignment := taLeftJustify;
|
FAlignment := taLeftJustify;
|
||||||
FormStyle := fsIgnoreMouseEvents;
|
BorderStyle := bsNone;
|
||||||
Caption := '';
|
Caption := '';
|
||||||
with GetControlClassDefaultSize do
|
with GetControlClassDefaultSize do
|
||||||
SetInitialBounds(0, 0, CX, CY);
|
SetInitialBounds(0, 0, CX, CY);
|
||||||
@ -69,6 +69,11 @@ begin
|
|||||||
RegisterHintWindow;
|
RegisterHintWindow;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure THintWindow.WMNCHitTest(var Message: TLMessage);
|
||||||
|
begin
|
||||||
|
Message.Result := HTTRANSPARENT;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure THintWindow.DoShowWindow;
|
procedure THintWindow.DoShowWindow;
|
||||||
begin
|
begin
|
||||||
if (ActiveControl = nil) and (not (csDesigning in ComponentState)) and (Parent=nil) then
|
if (ActiveControl = nil) and (not (csDesigning in ComponentState)) and (Parent=nil) then
|
||||||
|
@ -222,7 +222,7 @@ begin
|
|||||||
win.setLevel(HintWindowLevel);
|
win.setLevel(HintWindowLevel);
|
||||||
TCocoaPanel(win).callback := TLCLWindowCallback.Create(win, AWinControl);
|
TCocoaPanel(win).callback := TLCLWindowCallback.Create(win, AWinControl);
|
||||||
win.setDelegate(win);
|
win.setDelegate(win);
|
||||||
if Form.FormStyle=fsIgnoreMouseEvents then
|
if AWinControl.Perform(WM_NCHITTEST, 0, 0)=HTTRANSPARENT then
|
||||||
win.setIgnoresMouseEvents(True)
|
win.setIgnoresMouseEvents(True)
|
||||||
else
|
else
|
||||||
win.setAcceptsMouseMovedEvents(True);
|
win.setAcceptsMouseMovedEvents(True);
|
||||||
@ -480,7 +480,7 @@ var
|
|||||||
win.setTitle(ns);
|
win.setTitle(ns);
|
||||||
ns.release;
|
ns.release;
|
||||||
win.setAcceptsMouseMovedEvents(True);
|
win.setAcceptsMouseMovedEvents(True);
|
||||||
if Form.FormStyle=fsIgnoreMouseEvents then
|
if AWinControl.Perform(WM_NCHITTEST, 0, 0)=HTTRANSPARENT then
|
||||||
win.setIgnoresMouseEvents(True);
|
win.setIgnoresMouseEvents(True);
|
||||||
|
|
||||||
cnt.callback := TCocoaWindow(win).callback;
|
cnt.callback := TCocoaWindow(win).callback;
|
||||||
|
Loading…
Reference in New Issue
Block a user