0.9.2 «Put» plugin sends window in wrong direction

Bug #811591 reported by Chris Swetenham
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Sam Spilsbury
compiz-fusion-plugins-main (Ubuntu)

Bug Description

Tested using 9 horizontal viewports on Maverick and Natty.
Currently using compiz-fusion-plugins-main 0.9.4+bzr20110527-0ubuntu1~natty1.

When on viewport 1, using the Put plugin's 'send to viewport' command to send to viewport 8 will send the window in the wrong direction where it will get stuck past the edge of the screen - it never reaches viewport 8. Other combinations have the similar effects.

The issue seems to be in put.cpp function getDistance, case PutViewport. The calculation assumes the viewports wrap and it can send windows around 'the short way', but this doesn't work. I have commented out lines as follows:

/* take the shortest horizontal path to the destination viewport */
 hDirection = (vpX - s->vp ().x ());
// if (hDirection > (int) s->vpSize ().width () / 2)
// hDirection = (hDirection - s->vpSize ().width ());
// else if (hDirection < - ((int) s->vpSize ().width ()) / 2)
// hDirection = (hDirection + s->vpSize ().width ());

and this seems to fix the issue.

Related branches

Changed in compiz-put-plugin:
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Sam Spilsbury (smspillaz)
milestone: none →
Changed in compiz-fusion-plugins-main (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Changed in compiz:
assignee: nobody → Sam Spilsbury (smspillaz)
importance: Undecided → Low
status: New → In Progress
Changed in compiz:
status: In Progress → Fix Committed
no longer affects: compiz-put-plugin
Changed in compiz:
status: Fix Committed → Triaged
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.