Window Title and App Name Retrieval Fails with _NET_ACTIVE_WINDOW in copy/paste buffer

Bug #604143 reported by Joseph Lisee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
RescueTime Linux Uploader
Confirmed
Low
Dirk T

Bug Description

I have been tinkering with this cool little application and while examining the shell commands I had copied "_NET_ACTIVE_WINDOW" placing into my cut and paste buffer, and the output of "xprop -root". This in turn caused the running instance of the program to fail because the awk expression matched the "_NET_ACTIVE_WINDOW" listed in the CUT_BUFFER. The patch just adds "^" to the front so it makes sure to match the beginning of the line, pulling out the right info.

Revision history for this message
Joseph Lisee (jlisee) wrote :
Revision history for this message
j0rd (jordan-gocubeco) wrote :

I noticed the same thing.

You can fix it with a grep -v

xprop -id `xprop -root | grep -v CUT_BUFFER | awk '/_NET_ACTIVE_WINDOW/ {print $5; exit;}'`...

Of course this will then break, if your window title happens to be CUT_BUFFER, so you really can't win :)

Revision history for this message
Joseph Lisee (jlisee) wrote :

Well the patch provides a fix which works even when CUT_BUFFER is a window title, so we do win.

Dirk T (miriup)
Changed in rescuetime-linux-uploader:
assignee: nobody → Dirk T (miriup)
status: New → Confirmed
importance: Undecided → Low
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.