← Back to team overview

desktop-packages team mailing list archive

[Bug 1379960] Re: Menu interaction in fully maximised window causes the next click on the title bar to restore the window

 

This is a bug in libnux-4.0-0 on amd64, caused by the code in
GraphicsDisplay::MousePress (NuxGraphics/GraphicsDisplayX11.cpp) which
converts the unsigned long timestamp to a signed int:

if ((double_click_counter_ == 1) && ((int)current_time -
(int)last_click_time_ < double_click_time_delay))


The timestamp is in milliseconds, so it becomes negative after about 24.86 days.

The comparison works ok until the final click on the title bar, when last_click_time_ is 0.
Subtracting 0 from the negative current_time results in a value that is always less than double_click_time_delay.
The unnecessary cast to int should be removed.


Version:
libnux-4.0-0 4.0.7+14.10.20141007-0ubuntu1

** Also affects: nux
   Importance: Undecided
       Status: New

** Also affects: compiz
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to unity in Ubuntu.
Matching subscriptions: dp-unity
https://bugs.launchpad.net/bugs/1379960

Title:
  Menu interaction in fully maximised window causes the next click on
  the title bar to restore the window

Status in Compiz:
  New
Status in Nux:
  New
Status in Unity:
  New
Status in unity package in Ubuntu:
  New

Bug description:
  (Using the Terminal window as an example)
  1. Open a Terminal window
  2. Maximise a window fully so that its title bar and menu share the top Unity panel
  3. Click the "View" menu (the menu opens)
  4. Click the "Search" menu (the "View" menu closes)
  5. Click anywhere on the title bar
  6. The window restores to non-maximised size

  It shouldn't do this, only a double-click should restore the window.

  Alternative ways to trigger it:
  3. Click the "Terminal" menu
  4. Click the "Reset" option
  5. Click  anywhere on the title bar

  3. Click the "Terminal" menu
  4. Click inside the main area of the application
  5. Click anywhere on the title bar

  It looks like something is going wrong with the double-click detection
  when a menu is opened and then closed.

  Version: Ubuntu 14.04.1
  unity 7.2.2+14.04.20140714-0ubuntu1.1
  xorg 1:7.7+1ubuntu8

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