libnux set a wrong rect region when dual-desktop set a vertical overlap.

Bug #884564 reported by davidzhang.amd
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Nux
Invalid
Undecided
Jay Taoko
Unity
Invalid
Undecided
Unassigned
nux (Ubuntu)
Invalid
Undecided
Jay Taoko
unity (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I have a 2 monitors and create a external desktop environment, and the external panel stacked vertically above the primary panel. following is some information about xrandr -q
DFP1 disconnected (normal left inverted right x axis y axis)
DFP2 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200 60.0*+
   1920x1080 60.0
   1600x1200 60.0
DFP5 disconnected (normal left inverted right x axis y axis)
DFP6 connected 1920x1200+0+1200 (normal left inverted right x axis y axis) 582mm x 364mm
   1920x1200 60.0*+
   1920x1080 60.0
   1600x1200 60.0

So the primary panel locate at (0,0) while the external locate at (0,1200), and the unity task bar locate at the bottom of the primary display.
The I want to set the two panel vertical overlapped a small area( reset the position of the external display to(0, 1160) ). use the command: xrandr --output DFP6 --pos 0x1160
The issue observed, and I also found that the issue observed only in the vertical overlap size bigger than the taskbar height(default is 24 pix), if I set the overlap use command: xrandr --output DFP6 --pos 0x1180, every thing is OK.
I have founded the problem in libnux, in the file ./nux-1.14.0/nuxgraphics/XInputWindow.cpp, XInputWindow::SetStruts, line 144
if we set a overlap, and the vertical overlapped size larger than 24 pix, the external monitor information will be skipped to set, and then configure the task bar region a wrong position and a wrong big area. all the window and icons can't move to this area.
In gome2.x there also such problem, you can found the bug in gnome-panel-2.x, https://bugs.launchpad.net/ubuntu/+source/gnome-panel/+bug/884087

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: evince 3.2.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
Date: Tue Nov 1 10:06:32 2011
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: evince
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
davidzhang.amd (david1-zhang) wrote :
Jay Taoko (jaytaoko)
Changed in nux (Ubuntu):
status: New → Incomplete
status: Incomplete → Opinion
status: Opinion → New
assignee: nobody → Jay Taoko (jaytaoko)
Jay Taoko (jaytaoko)
Changed in nux:
status: New → Triaged
assignee: nobody → Jay Taoko (jaytaoko)
Changed in unity:
status: New → Triaged
Changed in nux (Ubuntu):
status: New → Triaged
Revision history for this message
Jay Taoko (jaytaoko) wrote :

Do you have a branch you could propose to fix this issue?

Revision history for this message
Jammy Zhou (jammy-zhou) wrote :

@Jay

IMHO, the simplest fix for this issue is attached to use bottom monitor info to set strut for the panel on bottom monitor. Please check if you can apply this change. Thx!

--- XInputWindow.cpp.orig 2012-02-27 18:11:50.784664537 +0800
+++ XInputWindow.cpp 2012-02-27 18:10:27.673351686 +0800
@@ -141,7 +141,7 @@
         int width = intersection->extents.x2 - intersection->extents.x1;
         int height = intersection->extents.y2 - intersection->extents.y1;

- if ((width * height) > (largestWidth * largestHeight))
+ if ((width * height) >= (largestWidth * largestHeight))
         {
           largestWidth = width;
           largestHeight = height;

Revision history for this message
davidzhang.amd (david1-zhang) wrote : RE: [Bug 884564] Re: libnux set a wrong rect region when dual-desktop seta vertical overlap.
Download full text (3.7 KiB)

Thanks for your support, I will try this patch soon, thank you
Regards
David

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Jammy Zhou
Sent: Monday, February 27, 2012 6:18 PM
To: Zhang, David1
Subject: [Bug 884564] Re: libnux set a wrong rect region when dual-desktop seta vertical overlap.

@Jay

IMHO, the simplest fix for this issue is attached to use bottom monitor
info to set strut for the panel on bottom monitor. Please check if you
can apply this change. Thx!

--- XInputWindow.cpp.orig 2012-02-27 18:11:50.784664537 +0800
+++ XInputWindow.cpp 2012-02-27 18:10:27.673351686 +0800
@@ -141,7 +141,7 @@
         int width = intersection->extents.x2 - intersection->extents.x1;
         int height = intersection->extents.y2 - intersection->extents.y1;

- if ((width * height) > (largestWidth * largestHeight))
+ if ((width * height) >= (largestWidth * largestHeight))
         {
           largestWidth = width;
           largestHeight = height;

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/884564

Title:
  libnux set a wrong rect region when dual-desktop set a vertical
  overlap.

Status in Nux:
  Triaged
Status in Unity:
  Triaged
Status in “nux” package in Ubuntu:
  Triaged

Bug description:
  I have a 2 monitors and create a external desktop environment, and the external panel stacked vertically above the primary panel. following is some information about xrandr -q
  DFP1 disconnected (normal left inverted right x axis y axis)
  DFP2 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
     1920x1200 60.0*+
     1920x1080 60.0
     1600x1200 60.0
  DFP5 disconnected (normal left inverted right x axis y axis)
  DFP6 connected 1920x1200+0+1200 (normal left inverted right x axis y axis) 582mm x 364mm
     1920x1200 60.0*+
     1920x1080 60.0
     1600x1200 60.0

  So the primary panel locate at (0,0) while the external locate at (0,1200), and the unity task bar locate at the bottom of the primary display.
  The I want to set the two panel vertical overlapped a small area( reset the position of the external display to(0, 1160) ). use the command: xrandr --output DFP6 --pos 0x1160
  The issue observed, and I also found that the issue observed only in the vertical overlap size bigger than the taskbar height(default is 24 pix), if I set the overlap use command: xrandr --output DFP6 --pos 0x1180, every thing is OK.
  I have founded the problem in libnux, in the file ./nux-1.14.0/nuxgraphics/XInputWindow.cpp, XInputWindow::SetStruts, line 144
  if we set a overlap, and the vertical overlapped size larger than 24 pix, the external monitor information will be skipped to set, and then configure the task bar region a wrong position and a wrong big area. all the window and icons can't move to this area.
  In gome2.x there also such problem, you can found the bug in gnome-panel-2.x, https://bugs.launchpad.net/ubuntu/+source/gnome-panel/+bug/884087

  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: evince 3.2.0-0...

Read more...

Changed in unity (Ubuntu):
status: New → Confirmed
Revision history for this message
dino99 (9d9) wrote :

Doing some cleaning on bug reports concerning: third parties reasons, outdated release, transitional issues
http://www.whizzy.org/2015/09/big-bug-bonanza-16-04-lts/

Changed in unity (Ubuntu):
status: Confirmed → Invalid
Changed in nux (Ubuntu):
status: Triaged → Invalid
Changed in unity:
status: Triaged → Invalid
Changed in nux:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.