pub fn new(
        connection: Arc<RustConnection>,
        close_window: Window,
        close_type: Atom,
        log: slog::Logger,
    ) -> Self {
        let (sender, channel) = sync_channel(5);
        let conn = Arc::clone(&connection);
        let log2 = log.clone();
        let event_thread = Some(spawn(move || {
            run_event_thread(conn, sender, log2);
        }));

        Self {
            connection,
            channel: Some(channel),
            event_thread,
            close_window,
            close_type,
            log,
        }
    }
/// Create a new X11 source.
///
/// The returned instance will use `SendRequest` to cause a `ClientMessageEvent` to be sent to
/// the given window with the given type. The expectation is that this is a window that was
/// created by us. Thus, the event reading thread will wake up and check an internal exit flag,
/// then exit.
Create a new X11 source.
The returned instance will use `SendRequest` to cause a `ClientMessageEvent` to be sent to
the given window with the given type. The expectation is that this is a window that was
created by us. Thus, the event reading thread will wake up and check an internal exit flag,
then exit.
Create a new X11 source . The returned instance will use ` SendRequest ` to cause a ` ClientMessageEvent ` to be sent to the given window with the given type . The expectation is that this is a window that was created by us . Thus the event reading thread will wake up and check an internal exit flag then exit .
pub fn new(
        connection: Arc<RustConnection>,
        close_window: Window,
        close_type: Atom,
        log: slog::Logger,
    ) -> Self {
        let (sender, channel) = sync_channel(5);
        let conn = Arc::clone(&connection);
        let log2 = log.clone();
        let event_thread = Some(spawn(move || {
            run_event_thread(conn, sender, log2);
        }));
        Self {
            connection,
            channel: Some(channel),
            event_thread,
            close_window,
            close_type,
            log,
        }
    }
pub fn new ( connection : Arc < RustConnection > , close_window : Window , close_type : Atom , log : slog :: Logger , ) -> Self { let ( sender , channel ) = sync_channel ( 5 ) ; let conn = Arc :: clone ( & connection ) ; let log2 = log . clone ( ) ; let event_thread = Some ( spawn ( move | | { run_event_thread ( conn , sender , log2 ) ; } ) ) ; Self { connection , channel : Some ( channel ) , event_thread , close_window , close_type , log , } }
Create a new X11 source.
Create a new X11 source .
connection
Arc<RustConnection>
close_window
Window
close_type
Atom
log
slog::Logger
connection
Arc<RustConnection>
close_window
Window
close_type
Atom
log
slog::Logger