mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
remove functions from .h, free memory, int to bool
This commit is contained in:
parent
05165a02f2
commit
a6207e473a
2 changed files with 13 additions and 4 deletions
|
@ -153,8 +153,6 @@ cairo_surface_t * x11_helper_get_bg_surface ( void );
|
||||||
* Creates an internal represenation of the available monitors.
|
* Creates an internal represenation of the available monitors.
|
||||||
* Used for positioning rofi.
|
* Used for positioning rofi.
|
||||||
*/
|
*/
|
||||||
uint8_t x11_is_randr_present ( void );
|
|
||||||
void x11_build_monitor_layout_xinerama ( void );
|
|
||||||
void x11_build_monitor_layout ( void );
|
void x11_build_monitor_layout ( void );
|
||||||
void x11_dump_monitor_layout ( void );
|
void x11_dump_monitor_layout ( void );
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
|
@ -56,6 +56,9 @@
|
||||||
#include "x11-helper.h"
|
#include "x11-helper.h"
|
||||||
#include "xkb-internal.h"
|
#include "xkb-internal.h"
|
||||||
|
|
||||||
|
int x11_is_randr_present ( void );
|
||||||
|
void x11_build_monitor_layout_xinerama ( void );
|
||||||
|
|
||||||
struct _xcb_stuff xcb_int = {
|
struct _xcb_stuff xcb_int = {
|
||||||
.connection = NULL,
|
.connection = NULL,
|
||||||
.screen = NULL,
|
.screen = NULL,
|
||||||
|
@ -215,7 +218,7 @@ static workarea * x11_get_monitor_from_output ( xcb_randr_output_t out )
|
||||||
return retv;
|
return retv;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t x11_is_randr_present () {
|
int x11_is_randr_present () {
|
||||||
xcb_query_extension_cookie_t randr_cookie = xcb_query_extension (
|
xcb_query_extension_cookie_t randr_cookie = xcb_query_extension (
|
||||||
xcb->connection,
|
xcb->connection,
|
||||||
sizeof("RANDR")-1,
|
sizeof("RANDR")-1,
|
||||||
|
@ -228,7 +231,15 @@ uint8_t x11_is_randr_present () {
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
return randr_reply->present;
|
uint8_t present = randr_reply->present;
|
||||||
|
|
||||||
|
free ( randr_reply );
|
||||||
|
|
||||||
|
if ( present ) {
|
||||||
|
return TRUE;
|
||||||
|
} else {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void x11_build_monitor_layout_xinerama () {
|
void x11_build_monitor_layout_xinerama () {
|
||||||
|
|
Loading…
Reference in a new issue