[Swfdec-commits] 2 commits - AUTHORS src/plugin_x11.c src/swfmoz_player.c
Pekka Lampila
medar at kemper.freedesktop.org
Sun May 4 06:18:29 PDT 2008
AUTHORS | 3 +++
src/plugin_x11.c | 4 ----
src/swfmoz_player.c | 22 ++++++++++++++++++++++
3 files changed, 25 insertions(+), 4 deletions(-)
New commits:
commit d72b4c28b070a7acfb4ee6fd192d980e400cde5b
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date: Sun May 4 16:16:35 2008 +0300
Take credit. Sync AUTHORS with the about dialog
diff --git a/AUTHORS b/AUTHORS
index 372f712..e636265 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,3 +1,6 @@
Andreas Nilsson <andreas at andreasn.se>
Benjamin Otte <otte at gnome.org>
+Cristian Grada <krigenator at gmail.com>
David Schleef <ds at schleef.org>
+Eric Anholt <eric at anholt.net>
+Pekka Lampila <pekka.lampila at iki.fi>
diff --git a/src/swfmoz_player.c b/src/swfmoz_player.c
index 1b4b816..bb4035d 100644
--- a/src/swfmoz_player.c
+++ b/src/swfmoz_player.c
@@ -71,6 +71,7 @@ swfmoz_player_menu_about (GtkMenuItem *item, SwfmozPlayer *player)
"Benjamin Otte <otte at gnome.org>",
"David Schleef <ds at schleef.org>",
"Eric Anholt <eric at anholt.net>",
+ "Pekka Lampila <pekka.lampila at iki.fi>",
NULL,
};
static const char *artists[] = {
commit 560a30073ac64d5c544caf16eb32e71493a5be22
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date: Sun May 4 16:15:14 2008 +0300
Handle background color according to the latest changes
diff --git a/src/plugin_x11.c b/src/plugin_x11.c
index 4db8320..22775e1 100644
--- a/src/plugin_x11.c
+++ b/src/plugin_x11.c
@@ -165,7 +165,6 @@ plugin_x11_setup_windowed (SwfmozPlayer *player, Window xwindow,
if (player->target == NULL) {
GdkWindowAttr attr;
GdkWindow *parent, *window;
- GdkColor color;
parent = gdk_window_foreign_new (xwindow);
if (parent == NULL) {
@@ -185,9 +184,6 @@ plugin_x11_setup_windowed (SwfmozPlayer *player, Window xwindow,
attr.window_type = GDK_WINDOW_CHILD;
attr.wclass = GDK_INPUT_OUTPUT;
window = gdk_window_new (parent, &attr, GDK_WA_X | GDK_WA_Y);
- color.red = color.green = color.blue = 65535;
- gdk_rgb_find_color (gdk_window_get_colormap (window), &color);
- gdk_window_set_background (window, &color);
gdk_window_add_filter (window, plugin_x11_filter_event, player);
gdk_window_show (window);
swfmoz_player_set_target (player, window, 0, 0, width, height);
diff --git a/src/swfmoz_player.c b/src/swfmoz_player.c
index f9a539c..1b4b816 100644
--- a/src/swfmoz_player.c
+++ b/src/swfmoz_player.c
@@ -290,6 +290,24 @@ swfmoz_player_update_cursor (SwfmozPlayer *player)
}
static void
+swfmoz_player_update_background (SwfmozPlayer *player)
+{
+ GdkWindow *window = player->target;
+ GdkColor bgcolor;
+ guint bg;
+
+ if (window == NULL)
+ return;
+
+ bg = swfdec_player_get_background_color (SWFDEC_PLAYER (player));
+ bgcolor.red = 0x101 * ((bg >> 16) & 0xFF);
+ bgcolor.green = 0x101 * ((bg >> 8) & 0xFF);
+ bgcolor.blue = 0x101 * (bg & 0xFF);
+ gdk_rgb_find_color (gdk_drawable_get_colormap (window), &bgcolor);
+ gdk_window_set_background (window, &bgcolor);
+}
+
+static void
swfmoz_player_fullscreen_destroyed (GtkWidget *widget, SwfmozPlayer *player)
{
player->fullscreen = NULL;
@@ -325,6 +343,8 @@ swfmoz_player_notify (SwfmozPlayer *player, GParamSpec *pspec, gpointer unused)
gtk_widget_destroy (player->fullscreen);
g_assert (player->fullscreen == NULL);
}
+ } else if (g_str_equal (pspec->name, "background-color")) {
+ swfmoz_player_update_background (player);
}
}
@@ -583,6 +603,7 @@ swfmoz_player_set_target (SwfmozPlayer *player, GdkWindow *target,
swfdec_gtk_player_set_missing_plugins_window (SWFDEC_GTK_PLAYER (player),
gdk_window_get_toplevel (target));
swfmoz_player_update_cursor (player);
+ swfmoz_player_update_background (player);
} else {
swfdec_gtk_player_set_missing_plugins_window (SWFDEC_GTK_PLAYER (player),
NULL);
More information about the Swfdec-commits
mailing list