howm
howm
handler.c File Reference

Handle the X events generated by clients that howm is managing. More...

#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <xcb/xcb.h>
#include <xcb/xcb_ewmh.h>
#include <xcb/xcb_icccm.h>
#include <xcb/xproto.h>
#include "client.h"
#include "handler.h"
#include "helper.h"
#include "howm.h"
#include "layout.h"
#include "location.h"
#include "monitor.h"
#include "types.h"
#include "workspace.h"
#include "xcb_help.h"

Functions

static void enter_event (xcb_generic_event_t *ev)
 The event that occurs when the mouse pointer enters a window. More...
 
static void destroy_event (xcb_generic_event_t *ev)
 The handler for destroy events. More...
 
static void button_press_event (xcb_generic_event_t *ev)
 Process a button press. More...
 
static void map_event (xcb_generic_event_t *ev)
 Handles mapping requests. More...
 
static void configure_event (xcb_generic_event_t *ev)
 Deal with a window's request to change its geometry. More...
 
static void unmap_event (xcb_generic_event_t *ev)
 Remove clients that wish to be unmapped. More...
 
static void client_message_event (xcb_generic_event_t *ev)
 Handle messages sent by the client to alter its state. More...
 
static void unhandled_event (xcb_generic_event_t *ev)
 
void handle_event (xcb_generic_event_t *ev)
 

Detailed Description

Handle the X events generated by clients that howm is managing.

Author
Harvey Hunt
Date
2015

Function Documentation

static void button_press_event ( xcb_generic_event_t *  ev)
static

Process a button press.

Parameters
evThe button press event.
static void client_message_event ( xcb_generic_event_t *  ev)
static

Handle messages sent by the client to alter its state.

Parameters
evThe client message as a generic event.
static void configure_event ( xcb_generic_event_t *  ev)
static

Deal with a window's request to change its geometry.

Parameters
evThe event sent from the window.
static void destroy_event ( xcb_generic_event_t *  ev)
static

The handler for destroy events.

Used when a window sends a destroy event, signalling that it wants to be unmapped. The client that the window belongs to is then removed from the client list for its repective workspace.

Parameters
evThe destroy event.
static void enter_event ( xcb_generic_event_t *  ev)
static

The event that occurs when the mouse pointer enters a window.

Parameters
evThe enter event.
void handle_event ( xcb_generic_event_t *  ev)
static void map_event ( xcb_generic_event_t *  ev)
static

Handles mapping requests.

When an X window wishes to be displayed, it send a mapping request. This function processes that mapping request and inserts the new client (created from the map requesting window) into the list of clients for the current workspace.

Parameters
evA mapping request event.
static void unhandled_event ( xcb_generic_event_t *  ev)
static
static void unmap_event ( xcb_generic_event_t *  ev)
static

Remove clients that wish to be unmapped.

Parameters
evAn event letting us know which client should be unmapped.