# HG changeset patch # User giacomo # Date 1170274343 28800 # Node ID 546e779aba643d3b9b47a02a2e3491d64b4a7c58 # Parent 8be45c22b20a73707dbb5f0f24d761d66fdcde53 [svn] - aosd: immediately hide osd window by single clicking (with mouse button 1) on it diff -r 8be45c22b20a -r 546e779aba64 ChangeLog --- a/ChangeLog Wed Jan 31 12:09:03 2007 -0800 +++ b/ChangeLog Wed Jan 31 12:12:23 2007 -0800 @@ -1,3 +1,10 @@ +2007-01-31 20:09:03 +0000 Giacomo Lozito + revision [1268] + - aosd: simplify the thread semaphores logic + trunk/src/aosd/aosd_osd.c | 33 +++++++++++---------------------- + 1 file changed, 11 insertions(+), 22 deletions(-) + + 2007-01-31 19:50:36 +0000 Giacomo Lozito revision [1266] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd diff -r 8be45c22b20a -r 546e779aba64 src/aosd/aosd_osd.c --- a/src/aosd/aosd_osd.c Wed Jan 31 12:09:03 2007 -0800 +++ b/src/aosd/aosd_osd.c Wed Jan 31 12:12:23 2007 -0800 @@ -85,6 +85,19 @@ } +static void +aosd_button_func ( Ghosd * osd , GhosdEventButton * ev , void * user_data ) +{ + if ( ev->button == 1 ) + { + pthread_mutex_lock( &aosd_status_mutex ); + aosd_status = AOSD_STATUS_INTERRUPT; + pthread_mutex_unlock( &aosd_status_mutex ); + } + return; +} + + static void * aosd_thread_func ( void * arg ) { @@ -204,6 +217,8 @@ layout_width + pad_left + pad_right , layout_height + pad_top + pad_bottom ); + ghosd_set_event_button_cb( osd , aosd_button_func , &stop_now ); + /* the aosd_status must be checked during the fade and display process (if another message arrives, the current transition must be abandoned ) */