From 292f4c8f9dd645563b79a44ee966245152f1b23a Mon Sep 17 00:00:00 2001 From: sabetts Date: Sat, 10 Feb 2001 22:56:13 +0000 Subject: * communications.c (send_restart, send_kill): Added * ratpoison.h: includes communications.h * main.c (send_restart, send_kill): Moved to communications.c * list.c (get_mouse_root_position): Added (add_to_window_list): Initialize new rp_window fields (save_mouse_position): Added (set_active_window): Added code to save and restore the position of the mouse * events.c (property_notify): Added code to listen for a WM_TRANSIENT_FOR property change. * data.h (struct rp_window): Added transient, transient_for, mouse_x, mouse_y. * actions.c (maximize_transient): Added (maximize): Added code to handle transient windows differently * Makefile.am (ratpoison_SOURCES): Added communications.h and communications.c --- src/main.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 4127abd..7a00205 100644 --- a/src/main.c +++ b/src/main.c @@ -72,47 +72,6 @@ sighandler () exit (EXIT_FAILURE); } -void -send_restart () -{ - XEvent ev; - int status; - - ev.xclient.type = ClientMessage; - ev.xclient.window = DefaultRootWindow (dpy); - ev.xclient.message_type = rp_restart; - ev.xclient.format = 32; - ev.xclient.data.l[0] = rp_restart; - ev.xclient.data.l[1] = CurrentTime; - - status = XSendEvent (dpy, DefaultRootWindow (dpy), False, SubstructureRedirectMask, &ev); - if (status == 0) - { - PRINT_ERROR ("failed to send restart event\n"); - } -} - -void -send_kill () -{ - XEvent ev; - int status; - - ev.xclient.type = ClientMessage; - ev.xclient.window = DefaultRootWindow (dpy); - ev.xclient.message_type = rp_kill; - ev.xclient.format = 32; - ev.xclient.data.l[0] = rp_kill; - ev.xclient.data.l[1] = CurrentTime; - - status = XSendEvent (dpy, DefaultRootWindow (dpy), False, SubstructureRedirectMask, &ev); - if (status == 0) - { - PRINT_ERROR ("failed to send kill event\n"); - } -} - - void hup_handler () { -- cgit v1.2.3