mirror of
https://github.com/davatorium/rofi.git
synced 2025-02-03 15:34:54 -05:00
Fix small leak
This commit is contained in:
parent
6e41457250
commit
e8328beb2d
2 changed files with 5 additions and 5 deletions
|
@ -146,6 +146,9 @@ static char **read_known_hosts_file ( char ** retv, unsigned int *length )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ( fclose ( fd ) != 0 ) {
|
||||||
|
fprintf ( stderr, "Failed to close hosts file: '%s'\n", strerror ( errno ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free ( path );
|
g_free ( path );
|
||||||
|
|
|
@ -643,24 +643,22 @@ static void menu_keyboard_navigation ( MenuState *state, KeySym key, unsigned in
|
||||||
* mouse navigation through the elements.
|
* mouse navigation through the elements.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static int intersect ( textbox *tb, int x, int y )
|
static int intersect ( const textbox *tb, int x, int y )
|
||||||
{
|
{
|
||||||
if ( x >= ( tb->x ) && x < ( tb->x + tb->w ) ) {
|
if ( x >= ( tb->x ) && x < ( tb->x + tb->w ) ) {
|
||||||
if ( y >= ( tb->y ) && y < ( tb->y + tb->h ) ) {
|
if ( y >= ( tb->y ) && y < ( tb->y + tb->h ) ) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
static int sb_intersect ( scrollbar *tb, int x, int y )
|
static int sb_intersect ( const scrollbar *tb, int x, int y )
|
||||||
{
|
{
|
||||||
if ( x >= ( tb->x ) && x < ( tb->x + tb->w ) ) {
|
if ( x >= ( tb->x ) && x < ( tb->x + tb->w ) ) {
|
||||||
if ( y >= ( tb->y ) && y < ( tb->y + tb->h ) ) {
|
if ( y >= ( tb->y ) && y < ( tb->y + tb->h ) ) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
static void menu_mouse_navigation ( MenuState *state, XButtonEvent *xbe )
|
static void menu_mouse_navigation ( MenuState *state, XButtonEvent *xbe )
|
||||||
|
@ -768,7 +766,6 @@ static void menu_refilter ( MenuState *state )
|
||||||
static void menu_draw ( MenuState *state, cairo_t *draw )
|
static void menu_draw ( MenuState *state, cairo_t *draw )
|
||||||
{
|
{
|
||||||
unsigned int i, offset = 0;
|
unsigned int i, offset = 0;
|
||||||
|
|
||||||
unsigned pixel = color_background ( display );
|
unsigned pixel = color_background ( display );
|
||||||
|
|
||||||
cairo_set_source_rgba ( draw,
|
cairo_set_source_rgba ( draw,
|
||||||
|
|
Loading…
Add table
Reference in a new issue