Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: plugin/linux/main_linux.cc

Issue 652076: Linux: make sure the fullscreen window always gets focus... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « plugin/cross/o3d_glue.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: plugin/linux/main_linux.cc
===================================================================
--- plugin/linux/main_linux.cc (revision 39634)
+++ plugin/linux/main_linux.cc (working copy)
@@ -473,7 +473,7 @@
}
if (event.in_plugin() && event.type() == Event::TYPE_MOUSEDOWN &&
obj->HitFullscreenClickRegion(event.x(), event.y())) {
- obj->RequestFullscreenDisplay();
+ obj->RequestFullscreenDisplay(button_event->time);
}
return TRUE;
}
@@ -910,7 +910,7 @@
// TODO: Where should this really live? It's platform-specific, but in
// PluginObject, which mainly lives in cross/o3d_glue.h+cc.
-bool PluginObject::RequestFullscreenDisplay() {
+bool PluginObject::RequestFullscreenDisplay(guint32 timestamp) {
if (fullscreen_ || fullscreen_pending_) {
return false;
}
@@ -953,7 +953,12 @@
g_signal_connect(window, "delete-event",
G_CALLBACK(GtkDeleteEventCallback), this);
gtk_fullscreen_container_ = widget;
- gtk_widget_show(widget);
+ // The timestamp here is optional. Presumably it is used by the window manager
+ // for obscure policy decisions (e.g., UI races).
piman 2010/02/22 22:41:53 FYI the timestamp is most likely used to properly
+ gtk_window_present_with_time(window, timestamp);
+ // Explicitly set focus, otherwise we may not get it depending on the window
+ // manager's policy for present.
+ gdk_window_focus(widget->window, timestamp);
// We defer switching to the new window until it gets displayed and assigned
// it's final dimensions in the configure-event.
fullscreen_pending_ = true;
« no previous file with comments | « plugin/cross/o3d_glue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698