Use Window Title if Class is empty

Bug #237181 reported by Carsten Schurig
2
Affects Status Importance Assigned to Milestone
RescueTime Linux Uploader
Fix Committed
Undecided
Unassigned

Bug Description

Currently WM_CLASS is reported to RescueTime. But there are windows that have an empty WM_CLASS unfortunately. I added a few lines of code to send the WM_NAME property instead if this is the case (else it wont be reported at all).

Revision history for this message
Carsten Schurig (cs42) wrote :
Revision history for this message
Elliot Murphy (statik) wrote :

Thanks for the patch! I've applied it, will be in the next release.

Changed in rescuetime-linux-uploader:
assignee: nobody → statik
status: New → Fix Committed
Revision history for this message
Carsten Schurig (cs42) wrote :

A new patch for the current (84) version (much easier and better due to the new code). This sets the application name to the window title, if the application name is empty.

--- uploader.py 2008-06-11 07:12:05.000000000 +0200
+++ uploader.py.new 2008-06-11 22:45:00.241661942 +0200
@@ -100,6 +100,9 @@
   self.start_time = datetime.datetime.today()
   self.app_name = self.get_active_application()
   self.window_title = self.get_active_window_title()
+
+ if not self.app_name.isalnum():
+ self.app_name = self.window_title

   self.end_time = None
   extended_info = self.get_extended_info()

Elliot Murphy (statik)
Changed in rescuetime-linux-uploader:
assignee: Elliot Murphy (statik) → nobody
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.