Mercurial > audlegacy-plugins
changeset 592:546e779aba64 trunk
[svn] - aosd: immediately hide osd window by single clicking (with mouse button 1) on it
author | giacomo |
---|---|
date | Wed, 31 Jan 2007 12:12:23 -0800 |
parents | 8be45c22b20a |
children | 988b130d66d3 |
files | ChangeLog src/aosd/aosd_osd.c |
diffstat | 2 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 <james@develia.org> + 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 <james@develia.org> revision [1266] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
--- 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 ) */