revision 668:c62dff190859
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 668:c62dff190859 |
parent | 667:0e1ac8da75d9 |
child | 669:ab344e42bca9 |
author | nkeynes |
date | Sun Apr 20 05:30:07 2008 +0000 (14 years ago) |
Use the command key for osx exit, as it seems easier than ctrl-alt at the moment
1.1 --- a/src/gtkui/main_win.c Sat Apr 19 02:39:37 2008 +00001.2 +++ b/src/gtkui/main_win.c Sun Apr 20 05:30:07 2008 +00001.3 @@ -160,6 +160,15 @@1.4 {1.5 main_window_t win = (main_window_t)user_data;1.6 if( win->is_grabbed ) {1.7 +#ifdef HAVE_GTK_OSX1.8 + /* On OSX, use the command key rather than ctrl-alt. Mainly because GTK/OSX1.9 + * doesn't seem to be able to get ctrl-alt reliably1.10 + **/1.11 + if( event->keyval == GDK_Meta_L || event->keyval == GDK_Meta_R ) {1.12 + video_window_ungrab_display(win);1.13 + return TRUE;1.14 + }1.15 +#else1.16 /* Check for ungrab key combo (ctrl-alt). Unfortunately GDK sends it as1.17 * a singly-modified keypress rather than a double-modified 'null' press,1.18 * so we have to do a little more work.1.19 @@ -174,6 +183,7 @@1.20 // Consume the keypress, DC doesn't get it.1.21 return TRUE;1.22 }1.23 +#endif1.24 }1.25 input_event_keydown( NULL, gtk_get_unmodified_keyval(event), 1 );1.26 return TRUE;1.27 @@ -298,7 +308,11 @@1.28 gtk_statusbar_pop( GTK_STATUSBAR(win->statusbar), 1 );1.29 if( win->is_grabbed ) {1.30 char buf[128];1.31 +#ifdef HAVE_GTK_OSX1.32 + snprintf( buf, sizeof(buf), "%s %s", text, _("(Press <command> to release grab)") );1.33 +#else1.34 snprintf( buf, sizeof(buf), "%s %s", text, _("(Press <ctrl><alt> to release grab)") );1.35 +#endif1.36 gtk_statusbar_push( GTK_STATUSBAR(win->statusbar), 1, buf );1.37 } else {1.38 gtk_statusbar_push( GTK_STATUSBAR(win->statusbar), 1, text );
.