samuraix.screen

class samuraix.screen.Screen(app, num)

A wrapper for a physical X screen. For many users, there will only be one Screen. For some others, there will be more.

The class attribute client_class is the class that will be used to create new clients. You can change it, but that’s maybe not such a good idea.

check_window_on_selection_clear(evt)
Event handler: most likely, a window manager wants to replace samurai-x2!
client_class
alias of Client
create_check_window()
The ‘check window’ is the window required by the _NET_SUPPORTING_WM_CHECK hint, specified in the netwm standard. It only has a _NET_WM_NAME property, set to ‘samurai-x2’. It’s override-redirected and invisible. This also sets the _NET_SUPPORTING_WM_CHECK hint.
focus(client)
focus the client client. It may be None => No focus.
get_geometry()
return a samuraix.rect.Rect describing the geometry of the physical screen.
manage(window)
manage a new window - this may not result in a window being managed if it is unsuitable (ie a dock or override-redirected window)
on_client_message(evt)
Root windows’ event handler for ooxcb.xproto.ClientMessageEvent: pass the client message event evt to process_netwm_client_message().
on_client_removed(client)

event handler: if a client’s window is removed, unmanage the client.

Todo:is that necessary?
on_configure_request(evt)

Root windows’ event handler for ooxcb.xproto.ConfigureRequestEvent. Fulfill the request, or give a warning if we received a very strange configure request: one that doesn’t request to change any values o_O

Event’s parent window is the event target of the configure request because sometimes we have a window that isn’t managed yet, but sends a configure request. This configure request would be lost.

on_destroy_notify(evt)
Root windows’ event handler for ooxcb.xproto.DestroyNotifyEvent. If there is a client managing evt‘s window, call samuraix.client.Client.remove() and set its window.valid to False.
on_map_request(evt)
Root windows’ event handler for ooxcb.xproto.MapRequestEvent. That will create a client for the window if there isn’t one already. In any case, this will map the window as requested.
on_unmanage_client(screen, client)
default handler: if the focused client is unmanaged, a random other client is focused. You May Override This.
process_netwm_client_message(evt)
process the netwm client message evt.
scan()
scan a screen for windows to manage
set_manager_selection()
acquire the WM_Sn selection, where n is the screen number
set_supported_hints(supported)
set the _NET_SUPPORTED atom to the hints we support
unmanage(client)
Unmanage the client client. That means: unban it. If we don’t unban it, it is unmapped. If it is unmapped, samurai-x won’t manage it if it’s restarted.
unmanage_all()
Unmanage all my clients. That is usually called at the end of samurai-x’ lifetime.
update_active_window()
Update _NET_ACTIVE_WINDOW; set it to self.focused_client.
update_client_list()
update the root window’s _NET_CLIENT_LIST property as described in the netwm standard.
samuraix.screen.configure_request_to_dict(evt)
Convert the ooxcb.xproto.ConfigureRequestEvent evt to a dictionary containing only the values that are requested to be changed and return it.

samurai-x

Previous topic

samuraix.rect

Next topic

samuraix.util

This Page