Skip to content

Commit

Permalink
Optimize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
serebit committed Oct 22, 2023
1 parent 29fbbcd commit a764915
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 40 deletions.
3 changes: 2 additions & 1 deletion src/input/seat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
#include "server.hpp"
#include "types.hpp"

#include "wlr-wrap-start.hpp"
#include <wayland-util.h>

#include "wlr-wrap-start.hpp"
#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_input_device.h>
Expand Down
2 changes: 0 additions & 2 deletions src/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
#include "surface/layer.hpp"
#include "types.hpp"

#include <algorithm>
#include <set>

#include <wlr-wrap-start.hpp>
#include <wlr/types/wlr_layer_shell_v1.h>
#include <wlr/types/wlr_scene.h>
#include <wlr-wrap-end.hpp>

static void output_enable_notify(wl_listener* listener, void* data) {
Expand Down
14 changes: 8 additions & 6 deletions src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,23 @@
#include "types.hpp"
#include "xwayland.hpp"

#include <algorithm>
#include <cassert>
#include <wayland-server.h>

#include "wlr-wrap-start.hpp"
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_data_control_v1.h>
#include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_export_dmabuf_v1.h>
#include <wlr/types/wlr_xdg_foreign_registry.h>
#include <wlr/types/wlr_xdg_foreign_v1.h>
#include <wlr/types/wlr_xdg_foreign_v2.h>
#include <wlr/types/wlr_gamma_control_v1.h>
#include <wlr/types/wlr_output_power_management_v1.h>
#include <wlr/types/wlr_presentation_time.h>
#include <wlr/types/wlr_primary_selection_v1.h>
#include <wlr/types/wlr_screencopy_v1.h>
#include <wlr/types/wlr_single_pixel_buffer_v1.h>
#include <wlr/types/wlr_viewporter.h>
#include <wlr/types/wlr_xdg_foreign_registry.h>
#include <wlr/types/wlr_xdg_foreign_v1.h>
#include <wlr/types/wlr_xdg_foreign_v2.h>
#include "wlr-wrap-end.hpp"

void Server::focus_view(View& view, wlr_surface* surface) {
Expand Down Expand Up @@ -315,7 +317,7 @@ Server::Server() : listeners(*this) {
listeners.activation_request_activation.notify = request_activation_notify;
wl_signal_add(&xdg_activation->events.request_activate, &listeners.activation_request_activation);

data_controller = wlr_data_control_manager_v1_create(display);
wlr_data_control_manager_v1_create(display);
foreign_toplevel_manager = wlr_foreign_toplevel_manager_v1_create(display);

xwayland = new XWayland(*this);
Expand Down
16 changes: 1 addition & 15 deletions src/server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,23 @@
#define MAGPIE_SERVER_HPP

#include "types.hpp"
#include "xwayland.hpp"

#include <functional>
#include <list>
#include <set>
#include <vector>

#include "wlr-wrap-start.hpp"
#include <wayland-server.h>
#include <wlr/render/allocator.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_data_control_v1.h>
#include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_drm_lease_v1.h>
#include <wlr/types/wlr_foreign_toplevel_management_v1.h>
#include <wlr/types/wlr_idle.h>
#include <wlr/types/wlr_idle_inhibit_v1.h>
#include <wlr/types/wlr_idle_notify_v1.h>
#include <wlr/types/wlr_layer_shell_v1.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_output_power_management_v1.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_single_pixel_buffer_v1.h>
#include <wlr/types/wlr_subcompositor.h>
#include <wlr/types/wlr_viewporter.h>
#include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/types/wlr_xdg_activation_v1.h>
#include <wlr/types/wlr_xdg_output_v1.h>
#include <wlr/types/wlr_xdg_shell.h>
#include <wlr/xwayland.h>
#include "wlr-wrap-end.hpp"

typedef enum {
Expand Down Expand Up @@ -75,7 +62,6 @@ class Server {

wlr_xdg_activation_v1* xdg_activation;

wlr_data_control_manager_v1* data_controller;
wlr_foreign_toplevel_manager_v1* foreign_toplevel_manager;

wlr_layer_shell_v1* layer_shell;
Expand Down
7 changes: 0 additions & 7 deletions src/surface/layer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,10 @@

#include "surface.hpp"
#include "types.hpp"

#include <functional>
#include <set>

#include "wlr-wrap-start.hpp"
#include <wlr/types/wlr_layer_shell_v1.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_subcompositor.h>
#include <wlr/types/wlr_xdg_shell.h>
#include <wlr/util/log.h>
#include "wlr-wrap-end.hpp"

class Layer : public Surface {
Expand Down
5 changes: 0 additions & 5 deletions src/surface/popup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
#include "surface.hpp"
#include "types.hpp"

#include "wlr-wrap-start.hpp"
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_xdg_shell.h>
#include "wlr-wrap-end.hpp"

static void popup_map_notify(wl_listener* listener, void* data) {
(void) listener;
(void) data;
Expand Down
3 changes: 0 additions & 3 deletions src/surface/popup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
#include "surface.hpp"
#include "types.hpp"

#include <functional>

#include "wlr-wrap-start.hpp"
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_xdg_shell.h>
#include "wlr-wrap-end.hpp"

Expand Down
1 change: 0 additions & 1 deletion src/surface/view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <optional>

#include "wlr-wrap-start.hpp"
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_xdg_shell.h>
#include <wlr/util/box.h>
#include <wlr/xwayland.h>
Expand Down

0 comments on commit a764915

Please sign in to comment.