[Wayland-bugs] [Bug 105830] libinput ignores xinput settings regarding mouse wheel (quick fix included)

2018-03-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105830

Bug ID: 105830
   Summary: libinput ignores xinput settings regarding mouse wheel
(quick fix included)
   Product: Wayland
   Version: unspecified
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: medium
 Component: libinput
  Assignee: wayland-bugs@lists.freedesktop.org
  Reporter: sblachm...@gmail.com

PROBLEM:
libinput ignores settings done by "xinput set-button-map" that set wheels to
zero to deactivate them.

For details, please see: http://forums.debian.net/viewtopic.php?f=6=137104
Bug https://bugs.freedesktop.org/show_bug.cgi?id=104960 is possibly also
influenced by this issue.

CAUSE:
My investigation showed what causes the bug.
The problem is in libinput.c.
Please look at the comments added by me to understand the problem.

SOLUTION:
My quick fix factually just consisted of disabling the wheel by always
returning zero movement.
A *proper* fix would check whether the wheel is enabled at all in the button
map set by xinput or xorg.conf, and discard the events if wheel is disabled.

<<>>
LIBINPUT_EXPORT double
libinput_event_pointer_get_axis_value_discrete(struct libinput_event_pointer
*event,
   enum libinput_pointer_axis axis)
{
struct libinput *libinput = event->base.device->seat->libinput;
double value = 0;

require_event_type(libinput_event_get_context(>base),
   event->base.type,
   0.0,
   LIBINPUT_EVENT_POINTER_AXIS);

if (!libinput_event_pointer_has_axis(event, axis)) {
log_bug_client(libinput, "value requested for unset axis\n");
} else {
switch (axis) {
case LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL:
value = event->discrete.x;
break;
case LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL:
value = event->discrete.y;
break;
}
}
//  return value;
//  
//  YUCKY BUG HERE: xinput-disabled wheels will generate events
//  FIX by checking xinput button map
//  for now just FSCK THE SCROLL SH!T

return 0;
}

LIBINPUT_EXPORT enum libinput_pointer_axis_source
libinput_event_pointer_get_axis_source(struct libinput_event_pointer *event)
{
require_event_type(libinput_event_get_context(>base),
   event->base.type,
   0,
   LIBINPUT_EVENT_POINTER_AXIS);

//  return event->source;
//  
//  YUCKY BUG HERE: xinput-disabled wheels will generate events
//  FIX by checking xinput button map
//  for now just FSCK THE SCROLL SH!T

return 0;
}
<<>>

-- 
You are receiving this mail because:
You are the assignee for the bug.___
wayland-bugs mailing list
wayland-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-bugs


[Wayland-bugs] [Bug 756910] wayland: tooltip is misplaced

2018-03-30 Thread gtk+
https://bugzilla.gnome.org/show_bug.cgi?id=756910

Daniel Boles  changed:

   What|Removed |Added

   See Also||https://bugzilla.gnome.org/
   ||show_bug.cgi?id=698730

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
wayland-bugs mailing list
wayland-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-bugs


[Wayland-bugs] [Bug 754716] [wayland] tooltips are placed outside of monitor

2018-03-30 Thread gtk+
https://bugzilla.gnome.org/show_bug.cgi?id=754716

Daniel Boles  changed:

   What|Removed |Added

 CC||dboles@gmail.com
 OS|Windows |Linux
   Severity|minor   |normal

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
wayland-bugs mailing list
wayland-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-bugs