mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 11:58:12 +02:00
LCL: Do not force-clear mouse capture flag on creation of TCustomEdit and TCustomComboBox, issue #40379.
Fixes text selection of TEdit and TComboBox on Gtk2 widgetset. This effectively reverts the following commits: Commit27d0c29fb7
(introduced long time ago to workaround Qt* widgetsets problems, which will be fixed separately). Commite4494cf4cd
(workaround for Gtk2 problems caused by the first one).
This commit is contained in:
parent
ca219eca4b
commit
469e1318dd
@ -891,7 +891,6 @@ begin
|
||||
inherited Create(TheOwner);
|
||||
|
||||
fCompStyle := csComboBox;
|
||||
ControlStyle := ControlStyle - [csCaptureMouse];
|
||||
with GetControlClassDefaultSize do
|
||||
SetInitialBounds(0, 0, CX, CY);
|
||||
FItems := TStringListUTF8Fast.Create;
|
||||
|
@ -68,7 +68,7 @@ begin
|
||||
inherited Create(AOwner);
|
||||
//FCompStyle is set here because TEdit inherits from this.
|
||||
//TCustomMemo also inherits from here but it's create changes fcompstyle to csMemo
|
||||
ControlStyle := ControlStyle - [csCaptureMouse] + [csRequiresKeyboardInput];
|
||||
ControlStyle := ControlStyle + [csRequiresKeyboardInput];
|
||||
FCompStyle := csEdit;
|
||||
FMaxLength := 0;
|
||||
FHideSelection := True;
|
||||
|
@ -1529,7 +1529,7 @@ begin
|
||||
if not (csDesigning in ACtl.ComponentState) and
|
||||
not (csCaptureMouse in ACtl.ControlStyle) and
|
||||
([ssLeft,ssRight,ssMiddle]*ShiftState <> []) and
|
||||
not (ACtl is TCustomForm) and not (ACtl is TScrollBar) and not (ACtl is TCustomEdit)
|
||||
not (ACtl is TCustomForm) and not (ACtl is TScrollBar)
|
||||
and not DragManager.IsDragging then
|
||||
begin
|
||||
if (Event^.x < 0) or (Event^.y < 0) or
|
||||
|
Loading…
Reference in New Issue
Block a user