about summary refs log tree commit diff
path: root/xevents.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-05-14 23:39:56 +0200
committerLeah Neukirchen <leah@vuxu.org>2020-05-14 23:39:56 +0200
commit3a570bb6793264f8d30e7c3c20951b9631450fd0 (patch)
treef4630a6e716ded7ca202a155e4be3e6a7eec083a /xevents.c
parent5fde2a2465dff28cdd3f753bd1d18656ae4b5660 (diff)
parent91c05f94032debb645c14c76c9911ea5cfba5d3c (diff)
downloadcwm-3a570bb6793264f8d30e7c3c20951b9631450fd0.tar.gz
cwm-3a570bb6793264f8d30e7c3c20951b9631450fd0.tar.xz
cwm-3a570bb6793264f8d30e7c3c20951b9631450fd0.zip
cvsimport
* refs/heads/master:
  Fixed memory leak in xu_get_strprop.
  Prevent out of boundary write with configuration files in which too many quoted arguments are stored for other window managers.
  Allow configuring a percentage window size of the master window during htile/vtile actions. From Uwe Werler, with a few manpage tweaks.
  zap stray tabs
  Instead of using _NET_ACTIVE_WINDOW on restart, use the pointer location to determine what client to set active. Reduces a round trip for every window.
  Add support for SIGINT/SIGTERM.
  Simplify conditional construct.
  Trim event_mask to those that the root window actually needs.
  No need to lookup current client early; move to right before it is needed.
  Recommit 1.259, but now with TAILQ_FOREACH_SAFE.
  Revert previous. Causes a crash as reported by Tom Murphy.
  Simplify list markup.
  Plug two memory leaks. Also get rid of a variable that is no longer necessary.
  Remove ColormaskChange from event-mask since there's no event handler.
  Unrelated style fixes, consistency changes and sorting, appropriate dosage/removal of wrappers, simplification of name queue, client cycle joins other kb/mb bound functions.
Diffstat (limited to 'xevents.c')
-rw-r--r--xevents.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/xevents.c b/xevents.c
index fbd93c5..5e138aa 100644
--- a/xevents.c
+++ b/xevents.c
@@ -84,13 +84,13 @@ xev_handle_maprequest(XEvent *ee)
 		return;
 
 	if ((old_cc = client_current(sc)) != NULL)
-		client_ptrsave(old_cc);
+		client_ptr_save(old_cc);
 
 	if ((cc = client_find(e->window)) == NULL)
-		cc = client_init(e->window, NULL, 0);
+		cc = client_init(e->window, NULL);
 
 	if ((cc != NULL) && (!(cc->flags & CLIENT_IGNORE)))
-		client_ptrwarp(cc);
+		client_ptr_warp(cc);
 }
 
 static void
@@ -103,7 +103,7 @@ xev_handle_unmapnotify(XEvent *ee)
 
 	if ((cc = client_find(e->window)) != NULL) {
 		if (e->send_event) {
-			client_set_wm_state(cc, WithdrawnState);
+			xu_set_wm_state(cc->win, WithdrawnState);
 		} else {
 			if (!(cc->flags & CLIENT_HIDDEN))
 				client_remove(cc);
@@ -191,10 +191,10 @@ xev_handle_propertynotify(XEvent *ee)
 	if ((cc = client_find(e->window)) != NULL) {
 		switch (e->atom) {
 		case XA_WM_NORMAL_HINTS:
-			client_getsizehints(cc);
+			client_get_sizehints(cc);
 			break;
 		case XA_WM_NAME:
-			client_setname(cc);
+			client_set_name(cc);
 			break;
 		case XA_WM_HINTS:
 			client_wm_hints(cc);
@@ -208,7 +208,7 @@ xev_handle_propertynotify(XEvent *ee)
 			break;
 		default:
 			if (e->atom == ewmh[_NET_WM_NAME])
-				client_setname(cc);
+				client_set_name(cc);
 			break;
 		}
 	} else {
@@ -230,7 +230,7 @@ xev_handle_enternotify(XEvent *ee)
 	Last_Event_Time = e->time;
 
 	if ((cc = client_find(e->window)) != NULL)
-		client_setactive(cc);
+		client_set_active(cc);
 }
 
 static void
@@ -399,9 +399,9 @@ xev_handle_clientmessage(XEvent *ee)
 	} else if (e->message_type == ewmh[_NET_ACTIVE_WINDOW]) {
 		if ((cc = client_find(e->window)) != NULL) {
 			if ((old_cc = client_current(NULL)) != NULL)
-				client_ptrsave(old_cc);
+				client_ptr_save(old_cc);
 			client_show(cc);
-			client_ptrwarp(cc);
+			client_ptr_warp(cc);
 		}
 	} else if (e->message_type == ewmh[_NET_WM_DESKTOP]) {
 		if ((cc = client_find(e->window)) != NULL) {