Changeset 215

Show
Ignore:
Timestamp:
05/06/2008 05:09:12 PM (8 months ago)
Author:
petli
Message:

Proof-of-concept frame implementation

Location:
trunk
Files:
1 added
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/examples/examplewm.py

    r198 r215  
    3333from plwm import wmanager, focus, keys, \ 
    3434     deltamove, outline, \ 
    35      border, color, font, views, \ 
     35     frame, color, font, views, \ 
    3636     modewindow, modestatus, \ 
    3737     mw_clock, mw_biff, \ 
     
    4646class MyClient(wmanager.Client, 
    4747               outline.XorOutlineClient, 
    48                border.BorderClient, 
    4948               modestatus.ModeFocusedTitleClient): 
    5049 
    51     no_border_clients = Or(name('XClock'), name('XBiff'), name('XModeWindow')) 
     50    # Put a frame around all client windows 
     51    window_proxy_class = frame.FrameProxy 
     52 
    5253    start_iconified_clients = name('WMManager') 
    5354    default_pointer_pos = {'Emacs': (-1, 0), 
  • trunk/plwm/__init__.py

    r212 r215  
    3939            'focus', 
    4040            'font', 
     41            'frame', 
    4142            'input', 
    4243            'inspect', 
  • trunk/plwm/wmanager.py

    r214 r215  
    384384             
    385385        Window.__init__(self, screen, window) 
     386 
     387        # Let proxy register event handlers now that we have a dispatcher  
     388        if self.window_proxy_class is not None: 
     389            window.__proxy_event_init__(self) 
     390 
    386391        self.window.change_save_set(X.SetModeInsert) 
    387392 
     
    16091614        """ 
    16101615 
    1611         # debug('verbose_event', 'handling %s', event) 
     1616        debug('verbose_event', 'handling %s', event) 
    16121617 
    16131618        # Continuation of the error handling hack: check if this is a 
     
    18661871 
    18671872 
     1873    def __proxy_event_init__(self, client): 
     1874        # Client can now register event handlers 
     1875        self._client = client 
     1876 
     1877 
    18681878    def __getattr__(self, attr): 
    18691879        # Unknown attribute in the proxy, grab it from the real window instead