[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#720690: marked as done (wrong mouse buttons in events)



Your message dated Fri, 23 Aug 2024 21:12:25 +0000
with message-id <[🔎] E1shba5-009Odg-Lj@fasolo.debian.org>
and subject line Bug#1078051: Removed package(s) from unstable
has caused the Debian Bug report #716871,
regarding wrong mouse buttons in events
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
716871: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=716871
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libsdl-ocaml
Version: 0.9.0-1
Severity: grave

libsdl-ocaml reports left mouse clicks as middle ones, middle mouse clicks as
right ones, and right mouse clicks as mouse-wheel up. This incorrect behaviour
can be verified with the attached program.
Mouse state reporting is not affected.

I believe the origin of the bug to be that the libsdl constants start with
#define SDL_BUTTON_LEFT		1
in SDL_mouse.h (in package libsdl1.2_1.2.15), while the OCaml type
Sdlmouse.button starts with
  | BUTTON_LEFT
at tag value 0.

Thus a fix (until later SDL versions change the constants (again?)) would be
replacing the line
    r = Val_int(b);
in
static value value_of_mouse_button(Uint8 b)
in sdlevent_stub.c by
    r = Val_int(b)-1;

I set the severity to grave, because all reverse-dependencies requiring left
mouse clicks (that should be most, but not all, reverse-dependencies) become
unusable.

Best regards,

  Mark Weyer

open Sdlevent

let string_of_button b =
  let open Sdlmouse in
  match b with
  | BUTTON_LEFT -> "left"
  | BUTTON_MIDDLE -> "middle"
  | BUTTON_RIGHT -> "right"
  | BUTTON_WHEELUP -> "up"
  | BUTTON_WHEELDOWN -> "down"
  | BUTTON_X x -> string_of_int x

;;

Sdl.init [`VIDEO];

let screen = Sdlvideo.set_video_mode ~w:800 ~h:600 ~bpp:32 []  in
Sdlvideo.update_rect screen;

enable_events Sdlevent.mouse_event_mask;

while true do
  let e = wait_event ()  in
  (match e with
  | MOUSEBUTTONDOWN e -> prerr_string ("mousedown "^string_of_button e.mbe_button)
  | MOUSEBUTTONUP e -> prerr_string ("mouseup "^string_of_button e.mbe_button)
  | _ -> prerr_string (string_of_event e));
  let _,_,buttons = Sdlmouse.get_state ()  in
  prerr_string ("("^String.concat "," (List.map string_of_button buttons)^")");
  prerr_string "\n";
  flush stderr;
done;


--- End Message ---
--- Begin Message ---
Version: 0.9.1-4+rm

Dear submitter,

as the package ocamlsdl has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/1078051

The version of this package that was in Debian prior to this removal
can still be found using https://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)

--- End Message ---

Reply to: