X-1.0rc3: secondary monitor: Match.left/right/below doesn't work on secondary monitor --- workaround --- fixed 1.1.0 (2015-05-15+)

Bug #816560 reported by Cristi Mihai on 2011-07-26
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Sikuli
Critical
RaiMan

Bug Description

***** workaround

only matches are affected. Region work.

cast matches to Regions:

s = Screen(1)
r = Region(s.find("asset.png"))
r.highlight()

---------------------------------------------------

App: Version X-1.0rc2 for Mac

Requirements: multiple monitor, with secondary monitor on the left (so Region coordinates are negative)

Use a script similar to this:

s = Screen(1)
r = s.find("asset.png")
r.highlight()

r.right(50).highlight() # is wrong

#probably there is a bug in computing the edge of the screen when the coordinates are negative.

Note: I haven't tried to move the secondary monitor on the right of primary to see if that still causes the issue.

description: updated
Cristi Mihai (cristi-mihai) wrote :

I tested with other display arrangements, the computation of right() and left() fail on all the possible arrangements, so it's not dependant to the arrangement.

Mac Lion confirmed.

For right() and left() the width of the new region is calculated using the width of the base region and not using the given width. This leads to the same negative value, no matter what value is given with left/right.

summary: - Region.left() / .right() doesn't work on secondary monitor that's on the
- left of primary one
+ X-1.0rc3: Region.left() / .right() doesn't work on secondary monitor
RaiMan (raimund-hocke) wrote :

below() seems to be wrong too.

Only Match objects have this effect.

Calculated Regions work ok.

Workaround: cast matches to Regions:

r = Region(s.find(image))
r.highlight(2)

summary: - X-1.0rc3: Region.left() / .right() doesn't work on secondary monitor
+ X-1.0rc3: Region.left/right/below doesn't work on secondary monitor ---
+ workaround
description: updated
Changed in sikuli:
milestone: none → x1.0-rc3
status: New → In Progress
Changed in sikuli:
milestone: x1.0-rc3 → none
tags: added: in rc3 works
tags: added: worksrc3
removed: in rc3 works
RaiMan (raimund-hocke) on 2011-10-29
summary: - X-1.0rc3: Region.left/right/below doesn't work on secondary monitor ---
+ X-1.0rc3: Match.left/right/below doesn't work on secondary monitor ---
workaround
tags: removed: worksrc3
summary: - X-1.0rc3: Match.left/right/below doesn't work on secondary monitor ---
- workaround
+ X-1.0rc3: secondary monitor: Match.left/right/below doesn't work on
+ secondary monitor --- workaround
tags: added: match monitor multi rc3 spatialoperators
RaiMan (raimund-hocke) on 2013-02-21
Changed in sikuli:
status: In Progress → Fix Committed
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → x1.0
importance: Undecided → Low
RaiMan (raimund-hocke) on 2013-02-21
Changed in sikuli:
importance: Low → High
tags: added: fkt-general
removed: match monitor multi rc3 spatialoperators
RaiMan (raimund-hocke) on 2013-02-24
tags: added: fkt-multimonitor
removed: fkt-general
RaiMan (raimund-hocke) on 2013-05-14
Changed in sikuli:
status: Fix Committed → In Progress
milestone: x1.0 → x1.1
RaiMan (raimund-hocke) on 2013-07-17
Changed in sikuli:
importance: High → Critical
RaiMan (raimund-hocke) on 2013-08-14
Changed in sikuli:
status: In Progress → Fix Committed
RaiMan (raimund-hocke) on 2013-08-14
Changed in sikuli:
importance: Critical → High
RaiMan (raimund-hocke) on 2015-05-15
summary: X-1.0rc3: secondary monitor: Match.left/right/below doesn't work on
- secondary monitor --- workaround
+ secondary monitor --- workaround --- fixed 1.1.0 (2015-05-15+)
Changed in sikuli:
importance: High → Critical
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers