put center followed by text highlighting broken

Bug #1001812 reported by Gareth Bailey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz Grid Plugin
New
Undecided
Unassigned

Bug Description

After using put center, when trying to highlight text in a terminal the cursor selects the wrong text. That is the cursor selects text from a position offset in the x-axis.

Revision history for this message
Gareth Bailey (garethbailey0) wrote :

The offending piece of code is the configureXWindow call in the 'center check'. I'm no X expert but I think you need to wait for a ChangeNotify before calling configureXWindow a second time.

However, I tried moveing this center check to the handleEvent method and doing the check on the changeNotify but the problem persisted so that's that theory out. Any ideas?

Also the center check doesn't actually work (for me), so we may as well just remove this peice of code if we can find no better place for it? (i.e. somewhere where it works and doesn't break anything else!)

Revision history for this message
Gareth Bailey (garethbailey0) wrote :

In the above I'm refering to this piece of code.

 if (centerCheck)
 {
     if ((cw->serverBorderRect ().width () >
   desiredSlot.width ()) ||
   cw->serverBorderRect ().width () <
   desiredSlot.width ())
     {
  wc.x = (workarea.width () >> 1) -
        ((cw->serverBorderRect ().width () >> 1) -
   cw->border ().left);
  cw->configureXWindow (CWX, &wc);
     }

     centerCheck = false;
 }
    }

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.