OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 // The return value is for whether we handled the event, not whether it | 909 // The return value is for whether we handled the event, not whether it |
910 // was successful, so return TRUE event for error. | 910 // was successful, so return TRUE event for error. |
911 return TRUE; | 911 return TRUE; |
912 } | 912 } |
913 SetGtkEventSource(gtk_fullscreen_container_); | 913 SetGtkEventSource(gtk_fullscreen_container_); |
914 } | 914 } |
915 renderer()->Resize(configure_event->width, configure_event->height); | 915 renderer()->Resize(configure_event->width, configure_event->height); |
916 client()->SendResizeEvent(renderer()->width(), renderer()->height(), | 916 client()->SendResizeEvent(renderer()->width(), renderer()->height(), |
917 true); | 917 true); |
918 fullscreen_ = true; | 918 fullscreen_ = true; |
919 return TRUE; | 919 // Return false here so that the default handler in GTK will still be invoked. |
| 920 return FALSE; |
920 } | 921 } |
921 | 922 |
922 gboolean PluginObject::OnGtkDelete(GtkWidget *widget, | 923 gboolean PluginObject::OnGtkDelete(GtkWidget *widget, |
923 GdkEvent *event) { | 924 GdkEvent *event) { |
924 DLOG_ASSERT(widget == gtk_fullscreen_container_); | 925 DLOG_ASSERT(widget == gtk_fullscreen_container_); |
925 CancelFullscreenDisplay(); | 926 CancelFullscreenDisplay(); |
926 return TRUE; | 927 return TRUE; |
927 } | 928 } |
928 | 929 |
929 bool PluginObject::GetDisplayMode(int id, o3d::DisplayMode *mode) { | 930 bool PluginObject::GetDisplayMode(int id, o3d::DisplayMode *mode) { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 client()->SendResizeEvent(renderer()->width(), renderer()->height(), | 1003 client()->SendResizeEvent(renderer()->width(), renderer()->height(), |
1003 false); | 1004 false); |
1004 SetGtkEventSource(gtk_container_); | 1005 SetGtkEventSource(gtk_container_); |
1005 gtk_widget_destroy(gtk_fullscreen_container_); | 1006 gtk_widget_destroy(gtk_fullscreen_container_); |
1006 gtk_fullscreen_container_ = NULL; | 1007 gtk_fullscreen_container_ = NULL; |
1007 fullscreen_window_ = 0; | 1008 fullscreen_window_ = 0; |
1008 fullscreen_ = false; | 1009 fullscreen_ = false; |
1009 } | 1010 } |
1010 } // namespace _o3d | 1011 } // namespace _o3d |
1011 } // namespace glue | 1012 } // namespace glue |
OLD | NEW |