Hide cursor if in notification bar, and soft reset on exit
This commit is contained in:
@@ -28,7 +28,7 @@ int main( int argc, char *argv[] )
|
||||
client.main();
|
||||
|
||||
client.shutdown();
|
||||
printf( "\n[stm is exiting.]\n" );
|
||||
printf( "\033[!p\n[stm is exiting.]\n" );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -219,6 +219,8 @@ void NotificationEngine::apply( Framebuffer &fb ) const
|
||||
assert( fb.ds.get_width() > 0 );
|
||||
assert( fb.ds.get_height() > 0 );
|
||||
|
||||
|
||||
/* draw bar across top of screen */
|
||||
Cell notification_bar( 0 );
|
||||
notification_bar.renditions.foreground_color = 37;
|
||||
notification_bar.renditions.background_color = 44;
|
||||
@@ -228,6 +230,11 @@ void NotificationEngine::apply( Framebuffer &fb ) const
|
||||
*(fb.get_mutable_cell( 0, i )) = notification_bar;
|
||||
}
|
||||
|
||||
/* hide cursor if necessary */
|
||||
if ( fb.ds.get_cursor_row() == 0 ) {
|
||||
fb.ds.cursor_visible = false;
|
||||
}
|
||||
|
||||
OverlayEngine::apply( fb );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user