summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-01-29 21:56:52 +0100
committerDave Davenport <qball@gmpclient.org>2016-01-29 21:56:52 +0100
commit3b723deb90ad686a43f1bea986bf632995cfe99d (patch)
tree28e308610455199e981136854d1721c1d2bdb79b /source
parenta8a8ba8cd2eb8a6070b8d5356e26b1e81add2392 (diff)
Re-enable blinking
Diffstat (limited to 'source')
-rw-r--r--source/rofi.c18
-rw-r--r--source/textbox.c2
2 files changed, 16 insertions, 4 deletions
diff --git a/source/rofi.c b/source/rofi.c
index 83632a83..b74f8528 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -215,6 +215,11 @@ typedef struct MenuState
void ( *finalize )( struct MenuState *state );
}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 )
{
if ( state && state->finalize ) {
@@ -230,6 +235,12 @@ void menu_state_queue_redraw ( void )
XFlush ( display );
}
}
+
+/**
+ * Create a new, 0 initialized MenuState structure.
+ *
+ * @returns a new 0 initialized MenuState
+ */
static MenuState *menu_state_create ( void )
{
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 ) );
current_active_menu = state;
}
+
void menu_state_set_selected_line ( MenuState *state, unsigned int 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;
}
+
void menu_state_free ( MenuState *state )
{
// Do this here?
@@ -2355,11 +2368,11 @@ int main ( int argc, char *argv[] )
if ( !XSupportsLocale () ) {
fprintf ( stderr, "X11 does not support locales\n" );
- return 11;
+ return EXIT_FAILURE;
}
if ( XSetLocaleModifiers ( "@im=none" ) == NULL ) {
fprintf ( stderr, "Failed to set locale modifier.\n" );
- return 10;
+ return EXIT_FAILURE;
}
if ( !( display = XOpenDisplay ( display_str ) ) ) {
fprintf ( stderr, "cannot open display!\n" );
@@ -2483,7 +2496,6 @@ int main ( int argc, char *argv[] )
if ( find_arg_str ( "-show", &sname ) == TRUE ) {
int index = switcher_get ( sname );
if ( index >= 0 ) {
- // TODO delay this till mainloop is running or we might miss X events.
run_switcher ( index );
g_idle_add ( delayed_start, GINT_TO_POINTER ( index ) );
}
diff --git a/source/textbox.c b/source/textbox.c
index fa5db216..a9b80899 100644
--- a/source/textbox.c
+++ b/source/textbox.c
@@ -103,7 +103,7 @@ textbox* textbox_create ( TextboxFlags flags, short x, short y, short w, short h
tb->blink_timeout = 0;
tb->blink = 1;
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;