updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / dmenu-xft-selscreen / dmenu-4.3.1-xft-selscreen.patch
blob8a45ead1e698b292db78ea27548117a339038bd3
1 Binary files dmenu-4.3.1.orig/dmenu and dmenu-4.3.1/dmenu differ
2 diff -p dmenu-4.3.1.orig/dmenu.1 dmenu-4.3.1/dmenu.1
3 *** dmenu-4.3.1.orig/dmenu.1 2011-05-20 13:19:54.750580965 +0800
4 --- dmenu-4.3.1/dmenu.1 2011-05-20 13:32:24.873183868 +0800
5 *************** dmenu \- dynamic menu
6 *** 20,25 ****
7 --- 20,27 ----
8 .IR color ]
9 .RB [ \-sf
10 .IR color ]
11 + .RB [ \-m
12 + .IR screen ]
13 .RB [ \-v ]
15 .BR dmenu_run " ..."
16 *************** defines the selected background color.
17 *** 77,82 ****
18 --- 79,87 ----
19 .BI \-sf " color"
20 defines the selected foreground color.
21 .TP
22 + .BI \-sf " screen"
23 + selects screen to be displayed on.
24 + .TP
25 .B \-v
26 prints version information to stdout, then exits.
27 .SH USAGE
28 diff -p dmenu-4.3.1.orig/dmenu.c dmenu-4.3.1/dmenu.c
29 *** dmenu-4.3.1.orig/dmenu.c 2011-05-20 13:19:54.750580965 +0800
30 --- dmenu-4.3.1/dmenu.c 2011-05-20 13:33:41.539435198 +0800
31 *************** static char text[BUFSIZ] = "";
32 *** 44,49 ****
33 --- 44,50 ----
34 static int bh, mw, mh;
35 static int inputw, promptw;
36 static int lines = 0;
37 + static int selscreen = -1;
38 static size_t cursor = 0;
39 static const char *font = NULL;
40 static const char *prompt = NULL;
41 *************** main(int argc, char *argv[]) {
42 *** 97,102 ****
43 --- 98,105 ----
44 selbgcolor = argv[++i];
45 else if(!strcmp(argv[i], "-sf"))
46 selfgcolor = argv[++i];
47 + else if(!strcmp(argv[i], "-m"))
48 + selscreen = atoi(argv[++i]);
49 else
50 usage();
52 *************** setup(void) {
53 *** 518,527 ****
54 unsigned int du;
55 Window dw;
57 ! XQueryPointer(dc->dpy, root, &dw, &dw, &x, &y, &di, &di, &du);
58 ! for(i = 0; i < n-1; i++)
59 ! if(INRECT(x, y, info[i].x_org, info[i].y_org, info[i].width, info[i].height))
60 ! break;
61 x = info[i].x_org;
62 y = info[i].y_org + (topbar ? 0 : info[i].height - mh);
63 mw = info[i].width;
64 --- 521,534 ----
65 unsigned int du;
66 Window dw;
68 ! if (selscreen >= 0 && selscreen < n)
69 ! i = selscreen;
70 ! else {
71 ! XQueryPointer(dc->dpy, root, &dw, &dw, &x, &y, &di, &di, &du);
72 ! for(i = 0; i < n-1; i++)
73 ! if(INRECT(x, y, info[i].x_org, info[i].y_org, info[i].width, info[i].height))
74 ! break;
75 ! }
76 x = info[i].x_org;
77 y = info[i].y_org + (topbar ? 0 : info[i].height - mh);
78 mw = info[i].width;
79 *************** setup(void) {
80 *** 555,560 ****
81 void
82 usage(void) {
83 fputs("usage: dmenu [-b] [-f] [-i] [-l lines] [-p prompt] [-fn font]\n"
84 ! " [-nb color] [-nf color] [-sb color] [-sf color] [-v]\n", stderr);
85 exit(EXIT_FAILURE);
87 --- 562,567 ----
88 void
89 usage(void) {
90 fputs("usage: dmenu [-b] [-f] [-i] [-l lines] [-p prompt] [-fn font]\n"
91 ! " [-nb color] [-nf color] [-sb color] [-sf color] [-m screen] [-v]\n", stderr);
92 exit(EXIT_FAILURE);
94 Binary files dmenu-4.3.1.orig/dmenu.o and dmenu-4.3.1/dmenu.o differ