[cheese/netbook-mode] window: keep size of the video screen while switching to wide mode
- From: Filippo Argiolas <fargiolas src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [cheese/netbook-mode] window: keep size of the video screen while switching to wide mode
- Date: Sat, 8 Aug 2009 09:49:45 +0000 (UTC)
commit b48d1960074cea62f67e27d62d1cdca368b716ef
Author: Filippo Argiolas <filippo argiolas gmail com>
Date: Sat Aug 8 11:48:42 2009 +0200
window: keep size of the video screen while switching to wide mode
This time for real, the previous method was utterly broken, this seems
to work correctly.
src/cheese-window.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/cheese-window.c b/src/cheese-window.c
index a3a15ce..5c50ae9 100644
--- a/src/cheese-window.c
+++ b/src/cheese-window.c
@@ -365,12 +365,13 @@ cheese_window_toggle_wide_mode (GtkWidget *widget, CheeseWindow *cheese_window)
}
/* try to keep video screen size while switching to and from wide mode */
- /* ugly and doesn't always work, look for a better way */
+
GtkRequisition req;
gint w, h;
- gdk_drawable_get_size (gtk_widget_get_window (cheese_window->screen), &w, &h);
+
gtk_widget_set_size_request (cheese_window->screen,
- w, h);
+ GTK_WIDGET (cheese_window->screen)->allocation.width,
+ GTK_WIDGET (cheese_window->screen)->allocation.height);
gtk_window_resize (cheese_window->window, 1, 1);
gtk_widget_size_request (cheese_window->window, &req);
gtk_window_resize (GTK_WINDOW (cheese_window->window), req.width, req.height);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]