summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authordrewski207 <drewski207@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-03-22 21:05:38 +0000
committerdrewski207 <drewski207@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-03-22 21:05:38 +0000
commit49e51459783e1de062551fe86ae7030582c81aa7 (patch)
tree3d68f87d9942df98799b8eb28df53c63bba67896 /src/gui
parentbba6d008d8b9bb7a8129fa23d0edea0bfde2e059 (diff)
downloadfpGUI-49e51459783e1de062551fe86ae7030582c81aa7.tar.xz
* Increased double buffer on x11 efficiency
* Fixed a bug on listbox that allowed Item 0 to be selected with the mouse * Fixed a possible bug for TfpgTimer that possibly could allow timers to be skipped if timer(s) were destroyed during the callback
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui_listbox.pas8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/gui_listbox.pas b/src/gui/gui_listbox.pas
index d3164176..219ced11 100644
--- a/src/gui/gui_listbox.pas
+++ b/src/gui/gui_listbox.pas
@@ -450,6 +450,8 @@ begin
end;
procedure TfpgBaseListBox.HandleMouseMove(x, y: integer; btnstate: word; shiftstate: TShiftState);
+var
+ NewFocus: Integer;
begin
inherited HandleMouseMove(x, y, btnstate, shiftstate);
@@ -459,7 +461,11 @@ begin
if ((not FMouseDragging) or (btnstate and 1 = 0)) and (not HotTrack) then
Exit; //==>
- FocusItem := FFirstItem + Trunc((y - FMargin) / RowHeight);
+ NewFocus := FFirstItem + Trunc((y - FMargin) / RowHeight);
+ if NewFocus < 1 then
+ NewFocus := 1;
+
+ FocusItem := NewFocus;
end;
procedure TfpgBaseListBox.HandleMouseScroll(x, y: integer; shiftstate: TShiftState; delta: smallint);