mirror of
https://github.com/lbonn/rofi
synced 2024-11-30 15:49:17 +00:00
Fix some compile warnings
This commit is contained in:
parent
9b16f21ddc
commit
d7b5b9fbfa
3 changed files with 5 additions and 7 deletions
|
@ -535,7 +535,7 @@ static gboolean main_loop_x11_event_handler ( xcb_generic_event_t *ev, G_GNUC_UN
|
|||
|
||||
// Because of abe_trigger, state of rofi can be changed. handle this!
|
||||
// Run mainloop on dummy event.
|
||||
xcb_generic_event_t dev = {0,};
|
||||
xcb_generic_event_t dev;
|
||||
dev.response_type = 0;
|
||||
main_loop_x11_event_handler_view ( &dev );
|
||||
}
|
||||
|
|
|
@ -127,10 +127,10 @@ unsigned int scrollbar_clicked ( const scrollbar *sb, int y )
|
|||
{
|
||||
if ( sb != NULL ) {
|
||||
if ( y >= sb->widget.y && y <= ( sb->widget.y + sb->widget.h ) ) {
|
||||
unsigned int r = ( sb->length * sb->widget.h ) / ( (double) ( sb->length + sb->pos_length ) );
|
||||
unsigned int handle = sb->widget.h - r;
|
||||
short r = ( sb->length * sb->widget.h ) / ( (double) ( sb->length + sb->pos_length ) );
|
||||
short handle = sb->widget.h - r;
|
||||
double sec = ( ( r ) / (double) ( sb->length - 1 ) );
|
||||
unsigned int half_handle = handle / 2;
|
||||
short half_handle = handle / 2;
|
||||
y -= sb->widget.y + half_handle;
|
||||
y = MIN ( MAX ( 0, y ), sb->widget.h - 2 * half_handle );
|
||||
|
||||
|
|
|
@ -640,15 +640,13 @@ gboolean x11_parse_key ( const char *combo, unsigned int *mod, xkb_keysym_t *key
|
|||
char *mod_key = input_key;
|
||||
char *error_msg = NULL;
|
||||
unsigned int modmask = 0;
|
||||
xkb_keysym_t sym = XKB_KEY_NoSymbol;
|
||||
// Test if this works on release.
|
||||
if ( g_str_has_prefix ( mod_key, "!" ) ) {
|
||||
++mod_key;
|
||||
*release = TRUE;
|
||||
}
|
||||
|
||||
char *saveptr = NULL;
|
||||
xkb_keysym_t sym = XKB_KEY_NoSymbol;
|
||||
|
||||
char **entries = g_strsplit_set ( mod_key, "+-", -1);
|
||||
for ( int i = 0; entries && entries[i]; i++ ) {
|
||||
char *entry = entries[i];
|
||||
|
|
Loading…
Reference in a new issue