about summary refs log tree commit diff stats
path: root/patches
diff options
context:
space:
mode:
authorAcid Bong <acid-bong@cock.lt>2022-10-18 10:18:33 +0300
committerAcid Bong <acid-bong@cock.lt>2022-10-18 10:18:33 +0300
commitf351bdf5a9608a9fa7a73b62d49a18198de4a003 (patch)
tree6e8b152a1cfdf460c3eaa124e595f74214669671 /patches
parent16d622ff75ebc04621dcf982ed79e5f01462f480 (diff)
downloaddwm-f351bdf5a9608a9fa7a73b62d49a18198de4a003.tar.gz
patch: alwayscenter (included)
Diffstat (limited to 'patches')
-rw-r--r--patches/1-alwayscenter-20200625-f04cac6.diff12
1 files changed, 12 insertions, 0 deletions
diff --git a/patches/1-alwayscenter-20200625-f04cac6.diff b/patches/1-alwayscenter-20200625-f04cac6.diff
new file mode 100644
index 0000000..03ea9ef
--- /dev/null
+++ b/patches/1-alwayscenter-20200625-f04cac6.diff
@@ -0,0 +1,12 @@
+diff -up dwm/dwm.c dwmmod/dwm.c
+--- dwm/dwm.c	2020-06-25 00:21:30.383692180 -0300
++++ dwmmod/dwm.c	2020-06-25 00:20:35.643692330 -0300
+@@ -1057,6 +1057,8 @@ manage(Window w, XWindowAttributes *wa)
+ 	updatewindowtype(c);
+ 	updatesizehints(c);
+ 	updatewmhints(c);
++	c->x = c->mon->mx + (c->mon->mw - WIDTH(c)) / 2;
++	c->y = c->mon->my + (c->mon->mh - HEIGHT(c)) / 2;
+ 	XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask);
+ 	grabbuttons(c, 0);
+ 	if (!c->isfloating)
it/083scenario_screen_test.mu?h=main&id=6f65d5918f4b73de56e6cb6362c7cbc7dbbe5945'>6f65d591 ^
bc643692 ^
6f65d591 ^

fb942da8 ^
6f65d591 ^
fb942da8 ^
1fd41772 ^
fb942da8 ^
1fd41772 ^






e80fd05f ^














1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

                                                                            
                                        
             
                                 
       
                       
                             






                         
                                                 
             
                                 

                     
                           
                                
                                               
       
                               






                         














                                       
# To check our support for screens in scenarios, rewrite tests from print.mu

scenario print-character-at-top-left-2 [
  local-scope
  assume-screen 3/width, 2/height
  run [
    a:char <- copy 97/a
    screen <- print screen, a
  ]
  screen-should-contain [
    .a  .
    .   .
  ]
]

scenario clear-line-erases-printed-characters-2 [
  local-scope
  assume-screen 5/width, 3/height
  # print a character
  a:char <- copy 97/a
  screen <- print screen, a
  # move cursor to start of line
  screen <- move-cursor screen, 0/row, 0/column
  run [
    screen <- clear-line screen
  ]
  screen-should-contain [
    .     .
    .     .
    .     .
  ]
]

scenario scroll-screen [
  local-scope
  assume-screen 3/width, 2/height
  run [
    a:char <- copy 97/a
    move-cursor screen, 1/row, 2/column
    screen <- print screen, a
    screen <- print screen, a
  ]
  screen-should-contain [
    .  a.
    .a  .
  ]
]