~ubuntu-branches/ubuntu/lucid/fpc/lucid-proposed

« back to all changes in this revision

Viewing changes to fpcsrc/rtl/win/mouse.pp

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-10-09 23:29:00 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20081009232900-553f61m37jkp6upv
Tags: 2.2.2-4
[ Torsten Werner ]
* Update ABI version in fpc-depends automatically.
* Remove empty directories from binary package fpc-source.

[ Mazen Neifer ]
* Removed leading path when calling update-alternatives to remove a Linitian
  error.
* Fixed clean target.
* Improved description of packages. (Closes: #498882)

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
           begin
79
79
             LastHandlermouseEvent:=e;
80
80
 
81
 
             { what till there is again space in the mouse event queue }
 
81
             { wait till there is again space in the mouse event queue }
82
82
             while PendingMouseEvents>=MouseEventBufSize do
83
83
               begin
84
84
                 LeaveCriticalSection(ChangeMouseEvents);
106
106
  mode:=mode or ENABLE_MOUSE_INPUT;
107
107
  SetConsoleMode(StdInputHandle,mode);
108
108
 
109
 
  PendingMouseHead:=@PendingMouseEvent;
110
 
  PendingMouseTail:=@PendingMouseEvent;
 
109
  PendingMouseHead:=@PendingMouseEvent[0];
 
110
  PendingMouseTail:=@PendingMouseEvent[0];
111
111
  PendingMouseEvents:=0;
112
112
  FillChar(LastMouseEvent,sizeof(TMouseEvent),0);
113
113
  InitializeCriticalSection(ChangeMouseEvents);
158
158
  EnterCriticalSection(ChangeMouseEvents);
159
159
  MouseEvent:=PendingMouseHead^;
160
160
  inc(PendingMouseHead);
161
 
  if ptrint(PendingMouseHead)=ptrint(@PendingMouseEvent)+sizeof(PendingMouseEvent) then
162
 
   PendingMouseHead:=@PendingMouseEvent;
 
161
  if ptruint(PendingMouseHead)=ptruint(@PendingMouseEvent)+sizeof(PendingMouseEvent) then
 
162
   PendingMouseHead:=@PendingMouseEvent[0];
163
163
  dec(PendingMouseEvents);
164
164
 
165
165
  { LastMouseEvent is already set at the end of the mouse event handler,
200
200
 
201
201
procedure SysPutMouseEvent(const MouseEvent: TMouseEvent);
202
202
begin
 
203
  EnterCriticalSection(ChangeMouseEvents);
203
204
  if PendingMouseEvents<MouseEventBufSize then
204
205
   begin
205
206
     PendingMouseTail^:=MouseEvent;
206
207
     inc(PendingMouseTail);
207
 
     if ptrint(PendingMouseTail)=ptrint(@PendingMouseEvent)+sizeof(PendingMouseEvent) then
208
 
      PendingMouseTail:=@PendingMouseEvent;
 
208
     if ptruint(PendingMouseTail)=ptruint(@PendingMouseEvent)+sizeof(PendingMouseEvent) then
 
209
      PendingMouseTail:=@PendingMouseEvent[0];
209
210
      { why isn't this done here ?
210
211
        so the win32 version do this by hand:}
211
212
       inc(PendingMouseEvents);
212
213
   end;
 
214
  LeaveCriticalSection(ChangeMouseEvents);
213
215
end;
214
216
 
215
217