[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RP] [PATCH 1/7] Remove useless argument from is_rp_window_for_screen fu
From: |
Mathieu OTHACEHE |
Subject: |
[RP] [PATCH 1/7] Remove useless argument from is_rp_window_for_screen function |
Date: |
Wed, 7 Dec 2016 10:03:52 +0100 |
The screen argument is useless as this function operates on all
screens. To find if a window belong to a specific ratpoison screen,
function is_rp_window_for_given_screen may be used.
---
src/events.c | 2 +-
src/manage.c | 2 +-
src/screen.c | 2 +-
src/screen.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/events.c b/src/events.c
index 5e1013a..e462d4f 100644
--- a/src/events.c
+++ b/src/events.c
@@ -82,7 +82,7 @@ new_window (XCreateWindowEvent *e)
/* New windows belong to the current screen */
s = rp_current_screen;
- if (is_rp_window_for_screen(e->window, s)) return;
+ if (is_rp_window_for_screen(e->window)) return;
if (s && win == NULL
&& e->window != s->key_window
diff --git a/src/manage.c b/src/manage.c
index 2faab71..8b62a30 100644
--- a/src/manage.c
+++ b/src/manage.c
@@ -460,7 +460,7 @@ scanwins(rp_screen *s)
for (i = 0; i < nwins; i++)
{
XGetWindowAttributes(dpy, wins[i], &attr);
- if (is_rp_window_for_screen(wins[i], s)
+ if (is_rp_window_for_screen(wins[i])
|| attr.override_redirect == True
|| unmanaged_window (wins[i])) continue;
diff --git a/src/screen.c b/src/screen.c
index fedddfa..b9bb696 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -468,7 +468,7 @@ is_rp_window_for_given_screen (Window w, rp_screen *s)
}
int
-is_rp_window_for_screen(Window w, rp_screen *s)
+is_rp_window_for_screen(Window w)
{
rp_screen *cur;
diff --git a/src/screen.h b/src/screen.h
index 0d5f68d..2072d36 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -39,7 +39,7 @@ void init_screens (void);
void activate_screen (rp_screen *s);
void deactivate_screen (rp_screen *s);
-int is_rp_window_for_screen (Window w, rp_screen *s);
+int is_rp_window_for_screen (Window w);
int is_a_root_window (unsigned int w);
char *screen_dump (rp_screen *screen);
--
2.10.0
- [RP] [PATCH 0/7] Add xrandr primary screen support, Mathieu OTHACEHE, 2016/12/07
- [RP] [PATCH 2/7] Move function declaration to the right header, Mathieu OTHACEHE, 2016/12/07
- [RP] [PATCH 1/7] Remove useless argument from is_rp_window_for_screen function,
Mathieu OTHACEHE <=
- [RP] [PATCH 4/7] Store RootWindow in global_screen structure, Mathieu OTHACEHE, 2016/12/07
- [RP] [PATCH 5/7] Add a function to find a screen matching a given XWindowAttributes, Mathieu OTHACEHE, 2016/12/07
- [RP] [PATCH 3/7] Add primary screen detection, Mathieu OTHACEHE, 2016/12/07
- [RP] [PATCH 7/7] Select xrandr primary screen at startup if possible, Mathieu OTHACEHE, 2016/12/07
- [RP] [PATCH 6/7] Simplify scanwins function, Mathieu OTHACEHE, 2016/12/07
- Re: [RP] [PATCH 0/7] Add xrandr primary screen support, Jeremie Courreges-Anglas, 2016/12/09