Skip to content

DWM patching

I didn't get a response in the suckless subreddit so maybe I can find some help here. I am having trouble patching DWM. I wget 'd the .diff file from the suckless website and then I CD to the /DWM and $ patch -p1 < /path/to/.diff but I got errors. Is my method correct? Is it a problem with the .diff?

0 points10 comments
Open on Reddit
About this post
Posted
Archived
Score
0 · 100% up
Kind
Text
ID
3456ei

Author

85
posts
767
comments
6
media
View profile

10 comments

unknown author1 hidden

the .diff file

Which .diff file?

the /DWM

Give a full path, please.

$ patch -ps1 < /path/to/.diff

patch -p1 /path/to/.diff # Code tags are easy to use.

2 points

This is the error I am getting. Do I need to add some other patches first?

dwm.c: In function‘ clientmessage’: dwm.c:589:26: error: incompatible types when assigning to type ‘long unsigned int’ from type ‘XftColor’ swa.background_pixel = scheme[SchemeNorm].bg->rgb;

dwm.c: In function ‘updatesystray’: dwm.c:2221:18: error: incompatible type for argument 9 of ‘XCreateSimpleWindow’ systray->win = XCreateSimpleWindow(dpy, root, x, m->by, w, bh, 0, 0, scheme[SchemeSel].bg->rgb);

In file included from dwm.c:36:0: /usr/include/X11/Xlib.h:1621:15: note: expected ‘long unsigned int’ but argument is of type ‘XftColor’ extern Window XCreateSimpleWindow(

dwm.c:2224:24: error: incompatible types when assigning to type ‘long unsigned int’ from type ‘XftColor’ wa.background_pixel = scheme[SchemeNorm].bg->rgb;

dwm.c:2244:24: error: incompatible types when assigning to type ‘long unsigned int’ from type ‘XftColor’ wa.background_pixel = scheme[SchemeNorm].bg->rgb;

dwm.c:2263:2: error: incompatible type for argument 3 of ‘XSetForeground’ XSetForeground(dpy, drw->gc, scheme[SchemeNorm].bg->rgb)

In file included from dwm.c:36:0: /usr/include/X11/Xlib.h:3227:12: note: expected ‘long unsigned int’ but argument is of type ‘XftColor’ extern int XSetForeground(

Makefile:18: recipe for target 'dwm.o' failed make: *** [dwm.o] Error 1

0 points
unknown author6 hidden

Please use code tags when posting code snippets or console output. Yes, it looks like the patch is somehow wrong/outdated, or missing some prerequisite patch, or some library is outdated/indated (is that a word?) or some similar issue.

2 points

Sorry, I will clean that up. I am confused. I downloaded the latest version of dwm from the website but the patch I was trying to use said for 6.1. Is there a 6.1? I don't see any mention of it on the website.

0 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.