Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
spectrwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f4dcc22
)
Use the global display variable.
author
Tiago Cunha
<tcunha@gmx.com>
Sat, 4 Feb 2012 14:25:40 +0000
(14:25 +0000)
committer
Tiago Cunha
<tcunha@gmx.com>
Tue, 7 Feb 2012 23:11:33 +0000
(23:11 +0000)
scrotwm.c
patch
|
blob
|
history
diff --git
a/scrotwm.c
b/scrotwm.c
index
647433f
..
0112d61
100644
(file)
--- a/
scrotwm.c
+++ b/
scrotwm.c
@@
-563,7
+563,7
@@
struct ewmh_hint {
void store_float_geom(struct ws_win *, struct swm_region *);
int floating_toggle_win(struct ws_win *);
void spawn_select(struct swm_region *, union arg *, char *, int *);
void store_float_geom(struct ws_win *, struct swm_region *);
int floating_toggle_win(struct ws_win *);
void spawn_select(struct swm_region *, union arg *, char *, int *);
-unsigned char *get_win_name(Display *, Window);
+unsigned char *get_win_name(Window);
int
get_property(Window id, Atom atom, long count, Atom type,
int
get_property(Window id, Atom atom, long count, Atom type,
@@
-1356,7
+1356,7
@@
bar_window_name(char *s, ssize_t sz, struct ws_win *cur_focus)
unsigned char *title;
if (window_name_enabled && cur_focus != NULL) {
unsigned char *title;
if (window_name_enabled && cur_focus != NULL) {
- title = get_win_name(display, cur_focus->id);
+ title = get_win_name(cur_focus->id);
if (title != NULL) {
DNPRINTF(SWM_D_BAR, "bar_window_name: title: %s\n",
title);
if (title != NULL) {
DNPRINTF(SWM_D_BAR, "bar_window_name: title: %s\n",
title);
@@
-3312,21
+3312,21
@@
iconify(struct swm_region *r, union arg *args)
}
unsigned char *
}
unsigned char *
-get_win_name(Display *dpy, Window win)
+get_win_name(Window win)
{
int status, retfmt;
unsigned long nitems, nbytes, nextra;
unsigned char *prop = NULL;
Atom rettype;
{
int status, retfmt;
unsigned long nitems, nbytes, nextra;
unsigned char *prop = NULL;
Atom rettype;
- status = XGetWindowProperty(dpy, win, a_netwmname, 0L, 0L, False,
+ status = XGetWindowProperty(display, win, a_netwmname, 0L, 0L, False,
a_utf8_string, &rettype, &retfmt, &nitems, &nbytes, &prop);
if (status != Success)
return (NULL);
XFree(prop);
a_utf8_string, &rettype, &retfmt, &nitems, &nbytes, &prop);
if (status != Success)
return (NULL);
XFree(prop);
- status = XGetWindowProperty(dpy, win, a_netwmname, 0L, nbytes, False,
- a_utf8_string, &rettype, &retfmt, &nitems, &nextra, &prop);
+ status = XGetWindowProperty(display, win, a_netwmname, 0L, nbytes,
+ False, a_utf8_string, &rettype, &retfmt, &nitems, &nextra, &prop);
if (status != Success) {
XFree(prop);
return (NULL);
if (status != Success) {
XFree(prop);
return (NULL);
@@
-3376,7
+3376,7
@@
uniconify(struct swm_region *r, union arg *args)
if (win->iconic == 0)
continue;
if (win->iconic == 0)
continue;
- name = get_win_name(display, win->id);
+ name = get_win_name(win->id);
if (name == NULL)
continue;
fprintf(lfile, "%s.%lu\n", name, win->id);
if (name == NULL)
continue;
fprintf(lfile, "%s.%lu\n", name, win->id);
@@
-3533,7
+3533,7
@@
search_resp_uniconify(char *resp, unsigned long len)
TAILQ_FOREACH(win, &search_r->ws->winlist, entry) {
if (win->iconic == 0)
continue;
TAILQ_FOREACH(win, &search_r->ws->winlist, entry) {
if (win->iconic == 0)
continue;
- name = get_win_name(display, win->id);
+ name = get_win_name(win->id);
if (name == NULL)
continue;
if (asprintf(&s, "%s.%lu", name, win->id) == -1) {
if (name == NULL)
continue;
if (asprintf(&s, "%s.%lu", name, win->id) == -1) {