Changeset 137
- Timestamp:
- 01/29/08 17:44:59 (1 year ago)
- Files:
-
- trunk/conf/config-example.py (modified) (3 diffs)
- trunk/pycawm/client.py (modified) (2 diffs)
- trunk/pycawm/menu.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/conf/config-example.py
r134 r137 159 159 add_post_hook(pika.button_press_reply, launch_app_on_click) 160 160 161 # 4- Set more stuff161 # 5- Set more stuff 162 162 163 163 # PycaWM has a special internal method to automatically set a wallpaper. … … 178 178 pika.set_placements(['SmartPlacement', 'CascadePlacement']) 179 179 180 # 5- Add some plugins180 # 6- Add some plugins 181 181 182 182 # PycaWM can be easily extended by plugins. … … 221 221 pika.add_plugin(RemoteREPL) 222 222 223 # 6- Theme223 # 7- Theme 224 224 pika.theme.menu.sub_menu.dx = -42 225 225 226 # 7- Last things to do...226 # 8- Last things to do... 227 227 228 228 # Manage all the existing clients connected to the wm display. trunk/pycawm/client.py
r134 r137 110 110 if self.window == client.transient_for: 111 111 self.transient_clients.append(client) 112 # we cannot access the WM_CLASS strings while the client is in 113 # withdrawn state (ICCCM 4.1.2.5) 114 self.resource_class = '' 115 self.resource_name = '' 112 116 self.name = self.window.get_wm_name() 113 117 self.geometry = self.window.get_geometry() … … 500 504 self.wm.place_client(self) 501 505 self.map() 506 # the client is in iconic/normal state here, we can now access 507 # the WM_CLASS strings 508 wm_class = self.window.get_wm_class() 509 if wm_class is not None: 510 self.resource_name, self.resource_class = wm_class 502 511 # do the client matching here 503 512 for client_p, funs in self.matches.iteritems(): trunk/pycawm/menu.py
r136 r137 147 147 self.grab_active() 148 148 self.display.sync() 149 self. used = (x != pointer.root_x or y != pointer.root_y)149 self.can_be_closed = (x != pointer.root_x or y != pointer.root_y) 150 150 151 151 def get_good_menu(self, window): … … 214 214 215 215 # elghinn bug corrected =) 216 if (not self. used and event.event_x == -1217 andevent.event_y == -1):218 return 219 220 self. used = True216 if (not self.can_be_closed and event.event_x == -1 and 217 event.event_y == -1): 218 return 219 220 self.can_be_closed = True 221 221 222 222 if self.child is not None: … … 377 377 @good_menu 378 378 def button_release_reply(self, _, event): 379 if not self. used:379 if not self.can_be_closed: 380 380 return 381 381
