mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
Cosmetic
This commit is contained in:
parent
2f9409ba74
commit
a541477e94
2 changed files with 17 additions and 16 deletions
|
@ -78,16 +78,16 @@ screensinfo_new(xcb_connection_t *conn)
|
||||||
int xinerama_screen_number, screen, screen_to_test;
|
int xinerama_screen_number, screen, screen_to_test;
|
||||||
xcb_screen_t *s;
|
xcb_screen_t *s;
|
||||||
bool drop;
|
bool drop;
|
||||||
xcb_xinerama_is_active_reply_t *r = NULL;
|
xcb_xinerama_is_active_reply_t *xia = NULL;
|
||||||
|
|
||||||
si = p_new(ScreensInfo, 1);
|
si = p_new(ScreensInfo, 1);
|
||||||
|
|
||||||
/* Check for extension before checking for Xinerama */
|
/* Check for extension before checking for Xinerama */
|
||||||
if(xcb_get_extension_data(conn, &xcb_xinerama_id)->present)
|
if(xcb_get_extension_data(conn, &xcb_xinerama_id)->present)
|
||||||
{
|
{
|
||||||
r = xcb_xinerama_is_active_reply(conn, xcb_xinerama_is_active(conn), NULL);
|
xia = xcb_xinerama_is_active_reply(conn, xcb_xinerama_is_active(conn), NULL);
|
||||||
si->xinerama_is_active = r->state;
|
si->xinerama_is_active = xia->state;
|
||||||
p_delete(&r);
|
p_delete(&xia);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(si->xinerama_is_active)
|
if(si->xinerama_is_active)
|
||||||
|
|
|
@ -119,27 +119,28 @@ bool
|
||||||
xutil_get_transient_for_hint(xcb_connection_t *c, xcb_window_t win,
|
xutil_get_transient_for_hint(xcb_connection_t *c, xcb_window_t win,
|
||||||
xcb_window_t *prop_win)
|
xcb_window_t *prop_win)
|
||||||
{
|
{
|
||||||
xcb_get_property_reply_t *r;
|
xcb_get_property_reply_t *t_hint_r;
|
||||||
|
|
||||||
/* Use checked because the error handler should not take care of
|
/* Use checked because the error handler should not take care of
|
||||||
* this error as we only return a boolean */
|
* this error as we only return a boolean */
|
||||||
r = xcb_get_property_reply(c,
|
t_hint_r = xcb_get_property_reply(c,
|
||||||
xcb_get_property(c, false, win,
|
xcb_get_property(c, false, win,
|
||||||
WM_TRANSIENT_FOR,
|
WM_TRANSIENT_FOR,
|
||||||
WINDOW, 0, 1),
|
WINDOW, 0, 1),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if(!r || r->type != WINDOW || r->format != 32 || r->length == 0)
|
if(!t_hint_r || t_hint_r->type != WINDOW || t_hint_r->format != 32 ||
|
||||||
|
t_hint_r->length == 0)
|
||||||
{
|
{
|
||||||
*prop_win = XCB_NONE;
|
*prop_win = XCB_NONE;
|
||||||
if(r)
|
if(t_hint_r)
|
||||||
p_delete(&r);
|
p_delete(&t_hint_r);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
*prop_win = *((xcb_window_t *) xcb_get_property_value(r));
|
*prop_win = *((xcb_window_t *) xcb_get_property_value(t_hint_r));
|
||||||
p_delete(&r);
|
p_delete(&t_hint_r);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -167,7 +168,7 @@ class_hint_t *
|
||||||
xutil_get_class_hint(xcb_connection_t *conn, xcb_window_t win)
|
xutil_get_class_hint(xcb_connection_t *conn, xcb_window_t win)
|
||||||
{
|
{
|
||||||
xcb_get_property_reply_t *class_hint_r = NULL;
|
xcb_get_property_reply_t *class_hint_r = NULL;
|
||||||
char *data = NULL;
|
char *data;
|
||||||
|
|
||||||
int len_name, len_class;
|
int len_name, len_class;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue