mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	swayidle: cleanup
No idea why wlr_output_layout was involved here.
This commit is contained in:
		
							parent
							
								
									dbeb03aa68
								
							
						
					
					
						commit
						4657ea5a42
					
				
					 1 changed files with 6 additions and 9 deletions
				
			
		| 
						 | 
					@ -1,22 +1,21 @@
 | 
				
			||||||
#define _XOPEN_SOURCE 500
 | 
					#define _XOPEN_SOURCE 500
 | 
				
			||||||
 | 
					#include <errno.h>
 | 
				
			||||||
#include <getopt.h>
 | 
					#include <getopt.h>
 | 
				
			||||||
#include <signal.h>
 | 
					 | 
				
			||||||
#include <pthread.h>
 | 
					#include <pthread.h>
 | 
				
			||||||
 | 
					#include <signal.h>
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
#include <stdlib.h>
 | 
					#include <stdlib.h>
 | 
				
			||||||
#include <errno.h>
 | 
					 | 
				
			||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
#include <sys/wait.h>
 | 
					#include <sys/wait.h>
 | 
				
			||||||
#include <unistd.h>
 | 
					#include <unistd.h>
 | 
				
			||||||
#include <wayland-client-protocol.h>
 | 
					#include <wayland-client-protocol.h>
 | 
				
			||||||
#include <wayland-client.h>
 | 
					#include <wayland-client.h>
 | 
				
			||||||
 | 
					#include <wayland-server.h>
 | 
				
			||||||
#include <wayland-util.h>
 | 
					#include <wayland-util.h>
 | 
				
			||||||
#include <wlr/config.h>
 | 
					#include <wlr/config.h>
 | 
				
			||||||
#include <wlr/util/log.h>
 | 
					#include <wlr/util/log.h>
 | 
				
			||||||
#include <wlr/types/wlr_output_layout.h>
 | 
					 | 
				
			||||||
#include <wlr/types/wlr_output.h>
 | 
					 | 
				
			||||||
#include "idle-client-protocol.h"
 | 
					 | 
				
			||||||
#include "config.h"
 | 
					#include "config.h"
 | 
				
			||||||
 | 
					#include "idle-client-protocol.h"
 | 
				
			||||||
#include "list.h"
 | 
					#include "list.h"
 | 
				
			||||||
#ifdef SWAY_IDLE_HAS_SYSTEMD
 | 
					#ifdef SWAY_IDLE_HAS_SYSTEMD
 | 
				
			||||||
#include <systemd/sd-bus.h>
 | 
					#include <systemd/sd-bus.h>
 | 
				
			||||||
| 
						 | 
					@ -36,7 +35,6 @@ struct swayidle_state {
 | 
				
			||||||
	struct wl_display *display;
 | 
						struct wl_display *display;
 | 
				
			||||||
	struct org_kde_kwin_idle_timeout *idle_timer;
 | 
						struct org_kde_kwin_idle_timeout *idle_timer;
 | 
				
			||||||
	struct org_kde_kwin_idle_timeout *lock_timer;
 | 
						struct org_kde_kwin_idle_timeout *lock_timer;
 | 
				
			||||||
	struct wlr_output_layout *layout;
 | 
					 | 
				
			||||||
	struct wl_event_loop *event_loop;
 | 
						struct wl_event_loop *event_loop;
 | 
				
			||||||
	list_t *timeout_cmds;
 | 
						list_t *timeout_cmds;
 | 
				
			||||||
} state;
 | 
					} state;
 | 
				
			||||||
| 
						 | 
					@ -360,7 +358,7 @@ static int display_event(int fd, uint32_t mask, void *data) {
 | 
				
			||||||
	if (wl_display_dispatch(state.display) < 0) {
 | 
						if (wl_display_dispatch(state.display) < 0) {
 | 
				
			||||||
		wlr_log_errno(WLR_ERROR, "wl_display_dispatch failed, exiting");
 | 
							wlr_log_errno(WLR_ERROR, "wl_display_dispatch failed, exiting");
 | 
				
			||||||
		sway_terminate(0);
 | 
							sway_terminate(0);
 | 
				
			||||||
	};
 | 
						}
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -397,7 +395,6 @@ int main(int argc, char *argv[]) {
 | 
				
			||||||
	struct wl_registry *registry = wl_display_get_registry(state.display);
 | 
						struct wl_registry *registry = wl_display_get_registry(state.display);
 | 
				
			||||||
	wl_registry_add_listener(registry, ®istry_listener, NULL);
 | 
						wl_registry_add_listener(registry, ®istry_listener, NULL);
 | 
				
			||||||
	wl_display_roundtrip(state.display);
 | 
						wl_display_roundtrip(state.display);
 | 
				
			||||||
	state.layout = wlr_output_layout_create();
 | 
					 | 
				
			||||||
	state.event_loop = wl_event_loop_create();
 | 
						state.event_loop = wl_event_loop_create();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (idle_manager == NULL) {
 | 
						if (idle_manager == NULL) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue