mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
Re-enable blinking
This commit is contained in:
parent
a8a8ba8cd2
commit
3b723deb90
2 changed files with 16 additions and 4 deletions
|
@ -215,6 +215,11 @@ typedef struct MenuState
|
||||||
void ( *finalize )( struct MenuState *state );
|
void ( *finalize )( struct MenuState *state );
|
||||||
}MenuState;
|
}MenuState;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param state The Menu Handle
|
||||||
|
*
|
||||||
|
* Check if a finalize function is set, and if sets executes it.
|
||||||
|
*/
|
||||||
static void menu_state_finalize ( MenuState *state )
|
static void menu_state_finalize ( MenuState *state )
|
||||||
{
|
{
|
||||||
if ( state && state->finalize ) {
|
if ( state && state->finalize ) {
|
||||||
|
@ -230,6 +235,12 @@ void menu_state_queue_redraw ( void )
|
||||||
XFlush ( display );
|
XFlush ( display );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new, 0 initialized MenuState structure.
|
||||||
|
*
|
||||||
|
* @returns a new 0 initialized MenuState
|
||||||
|
*/
|
||||||
static MenuState *menu_state_create ( void )
|
static MenuState *menu_state_create ( void )
|
||||||
{
|
{
|
||||||
return g_malloc0 ( sizeof ( MenuState ) );
|
return g_malloc0 ( sizeof ( MenuState ) );
|
||||||
|
@ -244,6 +255,7 @@ void menu_state_set_active ( MenuState *state )
|
||||||
g_assert ( ( current_active_menu == NULL && state != NULL ) || ( current_active_menu != NULL && state == NULL ) );
|
g_assert ( ( current_active_menu == NULL && state != NULL ) || ( current_active_menu != NULL && state == NULL ) );
|
||||||
current_active_menu = state;
|
current_active_menu = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_state_set_selected_line ( MenuState *state, unsigned int selected_line )
|
void menu_state_set_selected_line ( MenuState *state, unsigned int selected_line )
|
||||||
{
|
{
|
||||||
state->selected_line = selected_line;
|
state->selected_line = selected_line;
|
||||||
|
@ -258,6 +270,7 @@ void menu_state_set_selected_line ( MenuState *state, unsigned int selected_line
|
||||||
|
|
||||||
state->update = TRUE;
|
state->update = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_state_free ( MenuState *state )
|
void menu_state_free ( MenuState *state )
|
||||||
{
|
{
|
||||||
// Do this here?
|
// Do this here?
|
||||||
|
@ -2355,11 +2368,11 @@ int main ( int argc, char *argv[] )
|
||||||
|
|
||||||
if ( !XSupportsLocale () ) {
|
if ( !XSupportsLocale () ) {
|
||||||
fprintf ( stderr, "X11 does not support locales\n" );
|
fprintf ( stderr, "X11 does not support locales\n" );
|
||||||
return 11;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
if ( XSetLocaleModifiers ( "@im=none" ) == NULL ) {
|
if ( XSetLocaleModifiers ( "@im=none" ) == NULL ) {
|
||||||
fprintf ( stderr, "Failed to set locale modifier.\n" );
|
fprintf ( stderr, "Failed to set locale modifier.\n" );
|
||||||
return 10;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
if ( !( display = XOpenDisplay ( display_str ) ) ) {
|
if ( !( display = XOpenDisplay ( display_str ) ) ) {
|
||||||
fprintf ( stderr, "cannot open display!\n" );
|
fprintf ( stderr, "cannot open display!\n" );
|
||||||
|
@ -2483,7 +2496,6 @@ int main ( int argc, char *argv[] )
|
||||||
if ( find_arg_str ( "-show", &sname ) == TRUE ) {
|
if ( find_arg_str ( "-show", &sname ) == TRUE ) {
|
||||||
int index = switcher_get ( sname );
|
int index = switcher_get ( sname );
|
||||||
if ( index >= 0 ) {
|
if ( index >= 0 ) {
|
||||||
// TODO delay this till mainloop is running or we might miss X events.
|
|
||||||
run_switcher ( index );
|
run_switcher ( index );
|
||||||
g_idle_add ( delayed_start, GINT_TO_POINTER ( index ) );
|
g_idle_add ( delayed_start, GINT_TO_POINTER ( index ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,7 +103,7 @@ textbox* textbox_create ( TextboxFlags flags, short x, short y, short w, short h
|
||||||
tb->blink_timeout = 0;
|
tb->blink_timeout = 0;
|
||||||
tb->blink = 1;
|
tb->blink = 1;
|
||||||
if ( ( flags & TB_EDITABLE ) == TB_EDITABLE ) {
|
if ( ( flags & TB_EDITABLE ) == TB_EDITABLE ) {
|
||||||
// tb->blink_timeout = g_timeout_add ( 1200, textbox_blink, tb );
|
tb->blink_timeout = g_timeout_add ( 1200, textbox_blink, tb );
|
||||||
}
|
}
|
||||||
|
|
||||||
return tb;
|
return tb;
|
||||||
|
|
Loading…
Reference in a new issue