Introduction
Introduction Statistics Contact Development Disclaimer Help
slock-keep_screen-20241127-0751fda.diff - sites - public wiki contents of suckl…
git clone git://git.suckless.org/sites
Log
Files
Refs
---
slock-keep_screen-20241127-0751fda.diff (2052B)
---
1 From 0751fda0e682c1f60599a6e0afcd512861ee6297 Mon Sep 17 00:00:00 2001
2 From: agarrigu <[email protected]>
3 Date: Wed, 27 Nov 2024 18:59:56 +0000
4 Subject: [PATCH] [slock][patch][keep screen] Add patch
5
6 Don't create a background pixel or image, keep the screen as-is before
7 lock (including keeping any moving parts moving)
8 ---
9 slock.c | 15 ++-------------
10 1 file changed, 2 insertions(+), 13 deletions(-)
11
12 diff --git a/slock.c b/slock.c
13 index b2f14e3..19a688e 100644
14 --- a/slock.c
15 +++ b/slock.c
16 @@ -188,15 +188,6 @@ readpw(Display *dpy, struct xrandr *rr, struct lock…
17 break;
18 }
19 color = len ? INPUT : ((failure || failonclear)…
20 - if (running && oldc != color) {
21 - for (screen = 0; screen < nscreens; scr…
22 - XSetWindowBackground(dpy,
23 - locks[scre…
24 - locks[scre…
25 - XClearWindow(dpy, locks[screen]…
26 - }
27 - oldc = color;
28 - }
29 } else if (rr->active && ev.type == rr->evbase + RRScre…
30 rre = (XRRScreenChangeNotifyEvent*)&ev;
31 for (screen = 0; screen < nscreens; screen++) {
32 @@ -243,14 +234,12 @@ lockscreen(Display *dpy, struct xrandr *rr, int sc…
33
34 /* init */
35 wa.override_redirect = 1;
36 - wa.background_pixel = lock->colors[INIT];
37 lock->win = XCreateWindow(dpy, lock->root, 0, 0,
38 DisplayWidth(dpy, lock->screen),
39 DisplayHeight(dpy, lock->screen),
40 - 0, DefaultDepth(dpy, lock->screen),
41 - CopyFromParent,
42 + 0, 0, InputOnly,
43 DefaultVisual(dpy, lock->screen),
44 - CWOverrideRedirect | CWBackPixel, &wa…
45 + CWOverrideRedirect, &wa);
46 lock->pmap = XCreateBitmapFromData(dpy, lock->win, curs, 8, 8);
47 invisible = XCreatePixmapCursor(dpy, lock->pmap, lock->pmap,
48 &color, &color, 0, 0);
49 --
50 2.45.2
51
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.