Skip to content

Commit

Permalink
Merge pull request #41 from rocksdanister/dev-build
Browse files Browse the repository at this point in the history
Dev build
  • Loading branch information
rocksdanister authored Apr 15, 2020
2 parents 2232b4d + 6cc3f42 commit 47ba868
Show file tree
Hide file tree
Showing 13 changed files with 392 additions and 373 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,17 @@ Help translate lively to other languages: <a href="https://github.com/rocksdanis

**_I'm not officially affiliated with Unity technologies, godot, shadertoy;_**
## Download
##### Latest version: v0.9.5.0 (Windows 10, 8.1)[What's new?](https://github.com/rocksdanister/lively/releases/tag/v0.9.5.0)
##### Latest version: v0.9.5.1 (Windows 10, 8.1)[What's new?](https://github.com/rocksdanister/lively/releases/tag/v0.9.5.1)
- [`Download Lively Installer`][direct-full-win32]
_102MB, Web wallpaper support & some sample wallpapers included._
- [`Download Lively Portable`][direct-full-portable-win32]
_111MB, (No Installation) Web wallpaper support & some sample wallpapers included._

**Portable build: Latest Visual C++ Redistributable is required: [vc_redist.x86.exe](https://aka.ms/vs/16/release/vc_redist.x86.exe)**

[direct-full-win32]: https://github.com/rocksdanister/lively/releases/download/v0.9.5.0/lively_setup_x86_full_v0950.exe
[direct-full-win32]: https://github.com/rocksdanister/lively/releases/download/v0.9.5.1/lively_setup_x86_full_v0951.exe

[direct-full-portable-win32]: https://github.com/rocksdanister/lively/releases/download/v0.9.5.0/lively_portable_x86_full_v0950.zip
[direct-full-portable-win32]: https://github.com/rocksdanister/lively/releases/download/v0.9.5.1/lively_portable_x86_full_v0951.zip

**Installer will give Smartscreen warning, [discussion.](https://github.com/rocksdanister/lively/issues/9)**

Expand Down
2 changes: 1 addition & 1 deletion src/lively setup/Inno.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Lively Wallpaper"
#define MyAppVersion "0.9.0.0"
#define MyAppVersion "0.9.5.1"
#define MyAppPublisher "rocksdanister"
#define MyAppURL "https://github.com/rocksdanister/lively"
#define MyAppExeName "livelywpf.exe"
Expand Down
2 changes: 1 addition & 1 deletion src/livelywpf/livelywpf/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.9.5.0")]
[assembly: AssemblyVersion("0.9.5.1")]
[assembly: AssemblyFileVersion("1.0.0.0")]
469 changes: 232 additions & 237 deletions src/livelywpf/livelywpf/Properties/Resources.ru.resx

Large diffs are not rendered by default.

144 changes: 95 additions & 49 deletions src/livelywpf/livelywpf/docs/changelog.rtf

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions src/livelywpf/livelywpf/livelywpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,6 @@
<Compile Include="wp_lib\RawInputDX.xaml.cs">
<DependentUpon>RawInputDX.xaml</DependentUpon>
</Compile>
<Compile Include="wp_windows\LivelywpHolder.xaml.cs">
<DependentUpon>LivelywpHolder.xaml</DependentUpon>
</Compile>
<Compile Include="preview\PreviewWallpaper.xaml.cs">
<DependentUpon>PreviewWallpaper.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -431,10 +428,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="wp_windows\LivelywpHolder.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="preview\PreviewWallpaper.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down
47 changes: 26 additions & 21 deletions src/livelywpf/livelywpf/wp_lib/RawInputDX.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private void Window_SourceInitialized(object sender, EventArgs e)
var windowInteropHelper = new WindowInteropHelper(this);
var hwnd = windowInteropHelper.Handle;

//ExInputSink flag makes it work even when not in foreground, similar to global hook.. but asynchronous!
//ExInputSink flag makes it work even when not in foreground, similar to global hook.. but asynchronous, no complications & no AV false detection!
RawInputDevice.RegisterDevice(HidUsageAndPage.Mouse,
RawInputDeviceFlags.ExInputSink, hwnd);

Expand Down Expand Up @@ -215,30 +215,35 @@ private static void ForwardMessage(int x, int y, int msg, IntPtr wParam)
/// <returns>Localised cursor value</returns>
private static Point CalculateMousePos(int x, int y, Screen display)
{
if(!MainWindow.Multiscreen || SaveData.config.WallpaperArrangement == SaveData.WallpaperArrangement.span)
if (MainWindow.Multiscreen)
{
return new Point(x, y);
}

if (x < 0)
{
x = SystemInformation.VirtualScreen.Width + x - Screen.PrimaryScreen.Bounds.Width;
}
else
{
x -= Math.Abs(display.Bounds.X);
}
if (SaveData.config.WallpaperArrangement == SaveData.WallpaperArrangement.span)
{
x -= SystemInformation.VirtualScreen.Location.X;
y -= SystemInformation.VirtualScreen.Location.Y;
}
else //per-display or duplicate mode.
{
if (x < 0)
{
x = SystemInformation.VirtualScreen.Width + x - Screen.PrimaryScreen.Bounds.Width;
}
else
{
x -= Math.Abs(display.Bounds.X);
}

if (y < 0)
{
y = SystemInformation.VirtualScreen.Height + y - Screen.PrimaryScreen.Bounds.Height;
}
else
{
y -= Math.Abs(display.Bounds.Y);
if (y < 0)
{
y = SystemInformation.VirtualScreen.Height + y - Screen.PrimaryScreen.Bounds.Height;
}
else
{
y -= Math.Abs(display.Bounds.Y);
}
}
}
return new Point(x, y);
}

}
}
24 changes: 13 additions & 11 deletions src/livelywpf/livelywpf/wp_lib/SetupDesktop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,7 @@ public static async void SetWallpaper(SaveData.WallpaperLayout layout, bool show
extVidPlayers.Add(new ExtVidPlayers(handle, layout.DeviceName, proc, WallpaperType.video, 0));

BorderlessWinStyle(handle);
RemoveAppFromTaskbar(handle);
//AddWallpaper(handle, layout.DeviceName);
RemoveWindowFromTaskbar(handle);
SaveData.runningPrograms.Add(new SaveData.RunningProgram { ProcessName = proc.ProcessName, Pid = proc.Id });
SaveData.SaveRunningPrograms();

Expand Down Expand Up @@ -514,9 +513,7 @@ public static async void SetWallpaper(SaveData.WallpaperLayout layout, bool show
}

extPrograms.Add(new ExtProgram(handle, layout.DeviceName, proc, layout.Type, 0));
//removing from taskbar.
//StaticPinvoke.SetWindowLongPtr(new HandleRef(null,handle), (-20),(IntPtr)StaticPinvoke.WS_EX_TOOLWINDOW);
RemoveAppFromTaskbar(handle);
RemoveWindowFromTaskbar(handle);

AddWallpaper(handle, layout, showPreviewWindow);

Expand Down Expand Up @@ -624,7 +621,7 @@ public static async void SetWallpaper(SaveData.WallpaperLayout layout, bool show
extPrograms.Add(new ExtProgram(handle, layout.DeviceName, proc, layout.Type, 0));

BorderlessWinStyle(handle);
RemoveAppFromTaskbar(handle);
RemoveWindowFromTaskbar(handle);

AddWallpaper(handle, layout, showPreviewWindow);

Expand Down Expand Up @@ -756,7 +753,7 @@ public static async void SetWallpaper(SaveData.WallpaperLayout layout, bool show

extPrograms.Add(new ExtProgram(handle, layout.DeviceName, proc, layout.Type, 0));
BorderlessWinStyle(handle);
RemoveAppFromTaskbar(handle);
RemoveWindowFromTaskbar(handle);

AddWallpaper(handle, layout, showPreviewWindow);

Expand Down Expand Up @@ -815,8 +812,8 @@ public static async void SetWallpaper(SaveData.WallpaperLayout layout, bool show
return;
}

//BorderlessWinStyle(handle);
RemoveAppFromTaskbar(handle);
BorderlessWinStyle(handle);
RemoveWindowFromTaskbar(handle);

AddWallpaper(handle, layout, showPreviewWindow);
//StaticPinvoke.ShowWindow(handle, 3); //maximise
Expand Down Expand Up @@ -2610,9 +2607,14 @@ public static void InitializeTimer()
}
}

private static void RemoveAppFromTaskbar(IntPtr handle)
public static void RemoveWindowFromTaskbar(IntPtr handle)
{
NativeMethods.SetWindowLongPtr(new HandleRef(null, handle), (int)NativeMethods.GWL.GWL_EXSTYLE, (IntPtr)NativeMethods.WindowStyles.WS_EX_NOACTIVATE);
var styleNewWindowExtended =
(Int64)NativeMethods.WindowStyles.WS_EX_NOACTIVATE
| (Int64)NativeMethods.WindowStyles.WS_EX_TOOLWINDOW;

// update window styles
NativeMethods.SetWindowLongPtr(new HandleRef(null, handle), (-20), (IntPtr)styleNewWindowExtended);
}

/// <summary>
Expand Down
7 changes: 7 additions & 0 deletions src/livelywpf/livelywpf/wp_windows/GifWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public partial class GifWindow : Window
public GifWindow(string path)
{
InitializeComponent();
this.Loaded += GifWindow_Loaded;

gifImg.Stretch = SaveData.config.GifScaler;
AnimationBehavior.AddErrorHandler(gifImg, ErrorEvent);
Expand All @@ -35,6 +36,12 @@ public GifWindow(string path)
AnimationBehavior.SetRepeatBehavior(gifImg, System.Windows.Media.Animation.RepeatBehavior.Forever);
}

private void GifWindow_Loaded(object sender, RoutedEventArgs e)
{
//ShowInTaskbar = false :- causing issue with windows10 Taskview.
SetupDesktop.RemoveWindowFromTaskbar(new WindowInteropHelper(this).Handle);
}

private void ErrorEvent(object s, AnimationErrorEventArgs e)
{
Logger.Error("GIF:" + e.ToString());
Expand Down
16 changes: 0 additions & 16 deletions src/livelywpf/livelywpf/wp_windows/LivelywpHolder.xaml

This file was deleted.

27 changes: 0 additions & 27 deletions src/livelywpf/livelywpf/wp_windows/LivelywpHolder.xaml.cs

This file was deleted.

7 changes: 7 additions & 0 deletions src/livelywpf/livelywpf/wp_windows/MediaPlayer.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public partial class MediaPlayer : Window
public MediaPlayer(string path, int playSpeed)
{
InitializeComponent();
this.Loaded += MediaPlayer_Loaded;

mePlayer.LoadedBehavior = MediaState.Manual;
mePlayer.Source = new Uri(path);
Expand All @@ -46,6 +47,12 @@ public MediaPlayer(string path, int playSpeed)
mePlayer.Play();
}

private void MediaPlayer_Loaded(object sender, RoutedEventArgs e)
{
//ShowInTaskbar = false :- causing issue with windows10 Taskview.
SetupDesktop.RemoveWindowFromTaskbar(new WindowInteropHelper(this).Handle);
}

private void MePlayer_MediaOpened(object sender, RoutedEventArgs e)
{

Expand Down
7 changes: 7 additions & 0 deletions src/livelywpf/livelywpf/wp_windows/Mediakit.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public partial class Mediakit : Window
public Mediakit(string path, int playSpeed)
{
InitializeComponent();
this.Loaded += Mediakit_Loaded;

mePlayer.LoadedBehavior = WPFMediaKit.DirectShow.MediaPlayers.MediaState.Manual;
mePlayer.Source = new Uri(path);
Expand All @@ -47,6 +48,12 @@ public Mediakit(string path, int playSpeed)
mePlayer.Play();
}

private void Mediakit_Loaded(object sender, RoutedEventArgs e)
{
//ShowInTaskbar = false :- causing issue with windows10 Taskview.
SetupDesktop.RemoveWindowFromTaskbar(new WindowInteropHelper(this).Handle);
}

private void MePlayer_MediaOpened(object sender, RoutedEventArgs e)
{

Expand Down

0 comments on commit 47ba868

Please sign in to comment.