← Back to team overview

hugin-devs team mailing list archive

[Bug 1381310] Re: Fast preview (GLPreview) move/drag not handling mouse events properly

 

** Changed in: hugin
       Status: Fix Committed => Fix Released

** Changed in: hugin
    Milestone: None => 2015.0beta1

-- 
You received this bug notification because you are a member of Hugin
Developers, which is subscribed to Hugin.
https://bugs.launchpad.net/bugs/1381310

Title:
  Fast preview (GLPreview) move/drag not handling mouse events properly

Status in Hugin - Panorama Tools GUI:
  Fix Released

Bug description:
  I'm running Funtoo ~and64 and Hugin 2014.0.0-r1 from the Gentoo
  package repository (shared by Funtoo).

  I have used Hugin successfully for many years.  However, when I tried
  to use it again recently (after a lng hiatus) I found that the
  move/drag feature in the fast preview wasn't working.  Clicking and
  dragging in the preview had no effect.

  I built from the mercurial source code and found the same problem
  present.

  Some debugging work allowed me to figure out what is happening.  It
  seems that when I click in the preview, X is sending a MouseLeave and
  a MouseEnter event before it sends the MouseButton event.  Why it
  should do this escapes me, but it's not a hugin-specific thing because
  I see the same in xev in two different desktop environments.  Here is
  the xev output I get when depressing a mouse button:

  LeaveNotify event, serial 40, synthetic NO, window 0x5c00001,
      root 0x29e, subw 0x0, time 1220586960, (117,73), root:(747,1690),
      mode NotifyGrab, detail NotifyAncestor, same_screen YES,
      focus YES, state 256

  EnterNotify event, serial 40, synthetic NO, window 0x5c00001,
      root 0x29e, subw 0x0, time 1220586967, (117,73), root:(747,1690),
      mode NotifyUngrab, detail NotifyAncestor, same_screen YES,
      focus YES, state 256

  KeymapNotify event, serial 40, synthetic NO, window 0x0,
      keys:  4294967198 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
             0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

  ButtonPress event, serial 40, synthetic NO, window 0x5c00001,
      root 0x29e, subw 0x0, time 1220586967, (117,73), root:(747,1690),
      state 0x0, button 1, same_screen YES

  Hugin handles the MouseLeave, but not the MouseEnter.  It only deems
  the Mouse to have entered when there is also a MouseMove, which
  normally would be OK, but doesn't happen here.  Thus hugin thinks the
  mouse is not in the window and ignores the MouseButton event.

  This can be fixed by properly handling the MouseEnter event.  I have
  done that in the attached patch, which fixes the issue for me.

  System details from Help->About:

  Operating System: Linux 3.16.3-gentoo x86_64
  Architecture: 64 bit
  Free memory: 6871124 kiB

  Hugin
  Version: 2014.0.0.5da69bc383dd
  Path to resources: /usr/share/hugin/xrc/
  Path to data: /usr/share/hugin/data/
  Path to user lensfun database: $HOME/.local/share/lensfun

  Libraries
  wxWidgets: 3.0.1.0
  libpano13: 2.9.19 
  Boost: 1.55.0
  Exiv2: 0.24.0
  Lensfun: 0.3.0.0

To manage notifications about this bug go to:
https://bugs.launchpad.net/hugin/+bug/1381310/+subscriptions


References