Implement support for size hints (including test case)

This commit is contained in:
Michael Stapelberg
2010-10-11 21:32:04 +02:00
parent 0925e8b7dc
commit 5c2758af26
8 changed files with 195 additions and 108 deletions

View File

@ -22,6 +22,7 @@
#include <errno.h>
#include <err.h>
#include <stdint.h>
#include <math.h>
#include <xcb/xcb.h>
#include <xcb/xcb_aux.h>

View File

@ -283,6 +283,19 @@ struct Con {
double percent;
/* proportional width/height, calculated from WM_NORMAL_HINTS, used to
* apply an aspect ratio to windows (think of MPlayer) */
int proportional_width;
int proportional_height;
/* the wanted size of the window, used in combination with size
* increments (see below). */
int base_width;
int base_height;
/* minimum increment size specified for the window (in pixels) */
int width_increment;
int height_increment;
struct Window *window;
/* Should this container be marked urgent? This gets set when the window

View File

@ -158,6 +158,7 @@ int handle_client_message(void *data, xcb_connection_t *conn,
int handle_window_type(void *data, xcb_connection_t *conn, uint8_t state,
xcb_window_t window, xcb_atom_t atom,
xcb_get_property_reply_t *property);
#endif
/**
* Handles the size hints set by a window, but currently only the part
@ -171,7 +172,6 @@ int handle_normal_hints(void *data, xcb_connection_t *conn, uint8_t state,
xcb_window_t window, xcb_atom_t name,
xcb_get_property_reply_t *reply);
#endif
/**
* Handles the WM_HINTS property for extracting the urgency state of the window.
*