Introduction
Introduction Statistics Contact Development Disclaimer Help
[slock][patch][keep screen] Add patch - sites - public wiki contents of suckles…
git clone git://git.suckless.org/sites
Log
Files
Refs
---
commit 8f791fe35a6a039ea91acb82a902a6dc217f8e3a
parent c643abd69945f125a54b69f22fc81d03145232cc
Author: agarraga <[email protected]>
Date: Wed, 27 Nov 2024 19:15:57 +0000
[slock][patch][keep screen] Add patch
Keep the screen as is before lock, including keeping any moving parts
moving
Diffstat:
A tools.suckless.org/slock/patches/k… | 15 +++++++++++++++
A tools.suckless.org/slock/patches/k… | 51 +++++++++++++++++++++++++++…
2 files changed, 66 insertions(+), 0 deletions(-)
---
diff --git a/tools.suckless.org/slock/patches/keep-screen/index.md b/tools.suck…
@@ -0,0 +1,15 @@
+Keep Screen
+================
+
+Description
+-----------
+Don't blank or change the screen in any way when locking. Any moving parts
+(e.g. oneko, sl) will keep moving.
+
+Download
+--------
+* [slock-keep_screen-2024-11-27-0751fda.diff](slock-keep_screen-2024-11-27-075…
+
+Authors
+-------
+* Alonso Garrigues <[email protected]>
diff --git a/tools.suckless.org/slock/patches/keep-screen/slock-keep_screen-202…
@@ -0,0 +1,51 @@
+From 0751fda0e682c1f60599a6e0afcd512861ee6297 Mon Sep 17 00:00:00 2001
+From: agarrigu <[email protected]>
+Date: Wed, 27 Nov 2024 18:59:56 +0000
+Subject: [PATCH] [slock][patch][keep screen] Add patch
+
+Don't create a background pixel or image, keep the screen as-is before
+lock (including keeping any moving parts moving)
+---
+ slock.c | 15 ++-------------
+ 1 file changed, 2 insertions(+), 13 deletions(-)
+
+diff --git a/slock.c b/slock.c
+index b2f14e3..19a688e 100644
+--- a/slock.c
++++ b/slock.c
+@@ -188,15 +188,6 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **loc…
+ break;
+ }
+ color = len ? INPUT : ((failure || failonclear) ? FAI…
+- if (running && oldc != color) {
+- for (screen = 0; screen < nscreens; screen++)…
+- XSetWindowBackground(dpy,
+- locks[screen]->w…
+- locks[screen]->c…
+- XClearWindow(dpy, locks[screen]->win);
+- }
+- oldc = color;
+- }
+ } else if (rr->active && ev.type == rr->evbase + RRScreenChan…
+ rre = (XRRScreenChangeNotifyEvent*)&ev;
+ for (screen = 0; screen < nscreens; screen++) {
+@@ -243,14 +234,12 @@ lockscreen(Display *dpy, struct xrandr *rr, int screen)
+
+ /* init */
+ wa.override_redirect = 1;
+- wa.background_pixel = lock->colors[INIT];
+ lock->win = XCreateWindow(dpy, lock->root, 0, 0,
+ DisplayWidth(dpy, lock->screen),
+ DisplayHeight(dpy, lock->screen),
+- 0, DefaultDepth(dpy, lock->screen),
+- CopyFromParent,
++ 0, 0, InputOnly,
+ DefaultVisual(dpy, lock->screen),
+- CWOverrideRedirect | CWBackPixel, &wa);
++ CWOverrideRedirect, &wa);
+ lock->pmap = XCreateBitmapFromData(dpy, lock->win, curs, 8, 8);
+ invisible = XCreatePixmapCursor(dpy, lock->pmap, lock->pmap,
+ &color, &color, 0, 0);
+--
+2.45.2
+
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.