diff --git a/.gitignore b/.gitignore index e69de29..f31348f 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/light-locker-1.6.0.tar.bz2 diff --git a/7c5f159ed5db6c765688a2cdcce2a3cd88bf233d.patch b/7c5f159ed5db6c765688a2cdcce2a3cd88bf233d.patch new file mode 100644 index 0000000..e6b58b7 --- /dev/null +++ b/7c5f159ed5db6c765688a2cdcce2a3cd88bf233d.patch @@ -0,0 +1,19 @@ +From 7c5f159ed5db6c765688a2cdcce2a3cd88bf233d Mon Sep 17 00:00:00 2001 +From: Simon Steinbeiss +Date: Wed, 20 May 2015 13:04:25 +0200 +Subject: [PATCH] Fix typo in .desktop file (issue #55) + +--- + src/light-locker.desktop.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/light-locker.desktop.in b/src/light-locker.desktop.in +index b9192a8..166f8cc 100644 +--- a/src/light-locker.desktop.in ++++ b/src/light-locker.desktop.in +@@ -5,4 +5,4 @@ _Comment=Launch screen locker program + Icon=preferences-desktop-screensaver + Exec=light-locker + NoDisplay=true +-NotShownIn=Gnome;Unity ++NotShowIn=Gnome;Unity diff --git a/b638e6c8f49a46b832d0135069b2c2c1dd7246e8.patch b/b638e6c8f49a46b832d0135069b2c2c1dd7246e8.patch new file mode 100644 index 0000000..5d8b619 --- /dev/null +++ b/b638e6c8f49a46b832d0135069b2c2c1dd7246e8.patch @@ -0,0 +1,29 @@ +From b638e6c8f49a46b832d0135069b2c2c1dd7246e8 Mon Sep 17 00:00:00 2001 +From: Peter de Ridder +Date: Tue, 7 Apr 2015 21:31:14 +0200 +Subject: [PATCH] Queue a resize of all windows on monitor change + +--- + src/gs-manager.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/gs-manager.c b/src/gs-manager.c +index 32eeb52..79a7dd6 100644 +--- a/src/gs-manager.c ++++ b/src/gs-manager.c +@@ -424,6 +424,15 @@ on_screen_monitors_changed (GdkScreen *screen, + gdk_flush (); + gdk_x11_ungrab_server (); + } ++ ++ for (l = manager->priv->windows; l != NULL; l = l->next) { ++ GdkScreen *this_screen; ++ ++ this_screen = gs_window_get_screen (GS_WINDOW (l->data)); ++ if (this_screen == screen) { ++ gtk_widget_queue_resize (GTK_WIDGET (l->data)); ++ } ++ } + } + + static void diff --git a/light-locker.spec b/light-locker.spec new file mode 100644 index 0000000..a2a9788 --- /dev/null +++ b/light-locker.spec @@ -0,0 +1,82 @@ +Name: light-locker +Version: 1.6.0 +Release: 2%{?dist} +Summary: A simple session-locker for lightdm + +# unclear license: https://github.com/the-cavalry/light-locker/issues/33 +License: GPLv2+ +URL: https://github.com/the-cavalry/%{name} +Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.bz2 +# Queue a resize of all windows on monitor change +Patch0: %{url}/commit/b638e6c8f49a46b832d0135069b2c2c1dd7246e8.patch +# Fix typo in .desktop file (issue #55) +Patch1: %{url}/commit/7c5f159ed5db6c765688a2cdcce2a3cd88bf233d.patch + +#BuildRequires: gtk2-devel +BuildRequires: gtk3-devel +BuildRequires: libXScrnSaver-devel +# xorg-x11-proto provides "mit-ext" +BuildRequires: xorg-x11-proto-devel +BuildRequires: systemd-devel +BuildRequires: dbus-glib-devel +BuildRequires: intltool +BuildRequires: desktop-file-utils + +# functional runtime +Requires: lightdm + + +%description +%{name} is a simple locker (forked from gnome-screensaver) +that aims to have simple, sane, secure defaults and be well +integrated with the desktop while not carrying any desktop- +specific dependencies. +It relies on lightdm for locking and unlocking your session. + + +%prep +%setup -q +%patch0 -p1 +# desktop-file-validate does not like NotShowIn values +%patch1 -p1 +sed -i '/NotShowIn/d' src/*.desktop.in + +%build +# FIXME build also gtk2? ( --with-gtk2 ) +%configure --disable-silent-rules --with-gtk3 +make %{?_smp_mflags} V=1 + +%install +%make_install +%find_lang %{name} + +%check +desktop-file-validate %{buildroot}%{_sysconfdir}/xdg/autostart/*.desktop + + +%postun +if [ $1 -eq 0 ] ; then + /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : +fi + +%posttrans + /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : + + +%files -f %{name}.lang +%license COPYING COPYING.LIB +# ignore empty file HACKING +%doc AUTHORS ChangeLog NEWS README +%{_bindir}/%{name}* + %{_sysconfdir}/xdg/autostart/*.desktop +# glib2 owns %{datadir}/glib-2.0/schemas +%{_datadir}/glib-2.0/schemas/apps.*.xml +%{_mandir}/man1/%{name}*.1* + + +%changelog +* Fri Jun 26 2015 Raphael Groner - 1.6.0-2 +- fix license, enhance build options, add gsettings schema scriplets + +* Tue May 26 2015 Raphael Groner - 1.6.0-1 +- initial diff --git a/sources b/sources index e69de29..b324792 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +7f2425887d7bc8e86b53846f400d4ace light-locker-1.6.0.tar.bz2