banshee r3797 - in trunk/banshee: . src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying src/Libraries/Hyena.Gui/Hyena.Widgets
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3797 - in trunk/banshee: . src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying src/Libraries/Hyena.Gui/Hyena.Widgets
- Date: Sat, 19 Apr 2008 08:30:47 +0100 (BST)
Author: abock
Date: Sat Apr 19 07:30:46 2008
New Revision: 3797
URL: http://svn.gnome.org/viewvc/banshee?rev=3797&view=rev
Log:
2008-04-19 Aaron Bockover <abock gnome org>
* src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/FullscreenWindow.cs:
Lots of window manager and parent window interaction stuff so that
fullscreen behaves properly when a user does strange window management
like alt-tab when in fullscreen
* src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/NowPlayingInterface.cs:
Ensure that if for some reason the source is changed underneath the
fullscreen, it's merged back into the source UI
* src/Libraries/Hyena.Gui/Hyena.Widgets/RoundedFrame.cs: Use the proper
drawing call for non-standard border renders
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/FullscreenWindow.cs
trunk/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/NowPlayingInterface.cs
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/RoundedFrame.cs
Modified: trunk/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/FullscreenWindow.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/FullscreenWindow.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/FullscreenWindow.cs Sat Apr 19 07:30:46 2008
@@ -34,30 +34,76 @@
namespace Banshee.NowPlaying
{
public class FullscreenWindow : Window
- {
- public FullscreenWindow (Window parent) : base ("Banshee")
+ {
+ private Gtk.Window parent;
+
+ public FullscreenWindow (Window parent) : base (parent.Title)
{
+ this.parent = parent;
+
+ Deletable = false;
+ KeepAbove = true;
+ Decorated = false;
+ TransientFor = null;
+
Gdk.Screen screen = Screen;
int monitor = screen.GetMonitorAtWindow (parent.GdkWindow);
Gdk.Rectangle bounds = screen.GetMonitorGeometry (monitor);
Move (bounds.X, 0);
SetDefaultSize (bounds.Width, bounds.Height);
-
- Decorated = false;
}
protected override void OnRealized ()
{
Events |= Gdk.EventMask.PointerMotionMask | Gdk.EventMask.PointerMotionHintMask;
base.OnRealized ();
+
+ Screen.SizeChanged += OnScreenSizeChanged;
+ }
+
+ protected override void OnUnrealized ()
+ {
+ base.OnUnrealized ();
+ Screen.SizeChanged -= OnScreenSizeChanged;
+ }
+
+ protected override bool OnDeleteEvent (Gdk.Event evnt)
+ {
+ Hide ();
+ return true;
}
protected override void OnShown ()
{
base.OnShown ();
OnHideCursorTimeout ();
+ parent.AddNotification ("is-active", ParentActiveNotification);
+ }
+
+ protected override void OnHidden ()
+ {
+ base.OnHidden ();
+ parent.RemoveNotification ("is-active", ParentActiveNotification);
+ }
+
+ private void OnScreenSizeChanged (object o, EventArgs args)
+ {
}
+ private void ParentActiveNotification (object o, GLib.NotifyArgs args)
+ {
+ // If our parent window is ever somehow activated while we are
+ // visible, this will ensure we merge back into the parent
+ if (parent.IsActive) {
+ parent.GdkWindow.SkipPagerHint = false;
+ parent.GdkWindow.SkipTaskbarHint = false;
+ Hide ();
+ } else {
+ parent.GdkWindow.SkipPagerHint = true;
+ parent.GdkWindow.SkipTaskbarHint = true;
+ }
+ }
+
protected override bool OnKeyPressEvent (Gdk.EventKey evnt)
{
switch (evnt.Key) {
@@ -123,7 +169,7 @@
private void UpdateHiddenCursorPosition ()
{
- Screen.Display.GetPointer (out hide_cursor_x, out hide_cursor_y);
+ GetPointer (out hide_cursor_x, out hide_cursor_y);
}
private void ShowCursor ()
Modified: trunk/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/NowPlayingInterface.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/NowPlayingInterface.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/NowPlayingInterface.cs Sat Apr 19 07:30:46 2008
@@ -116,6 +116,8 @@
internal void OverrideFullscreen ()
{
+ FullscreenHandler (false);
+
InterfaceActionService service = ServiceManager.Get<InterfaceActionService> ();
if (service == null || service.ViewActions == null) {
return;
@@ -128,6 +130,8 @@
internal void RelinquishFullscreen ()
{
+ FullscreenHandler (false);
+
InterfaceActionService service = ServiceManager.Get<InterfaceActionService> ();
if (service == null || service.ViewActions == null) {
return;
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/RoundedFrame.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/RoundedFrame.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/RoundedFrame.cs Sat Apr 19 07:30:46 2008
@@ -157,9 +157,9 @@
theme.Context.ShowStroke = draw_border;
if (fill_color_set) {
- theme.DrawFrame (cr, rect, fill_color);
+ theme.DrawFrameBackground (cr, rect, fill_color);
} else {
- theme.DrawFrame (cr, rect, true);
+ theme.DrawFrameBorder (cr, rect);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]