mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-04-06 07:15:31 -04:00
Changes are made.
This commit is contained in:
parent
6f3265185a
commit
3799897bcb
13 changed files with 21 additions and 1412 deletions
72
dwl.c
72
dwl.c
|
|
@ -1,6 +1,3 @@
|
|||
/*
|
||||
* See LICENSE file for copyright and license details.
|
||||
*/
|
||||
#include <getopt.h>
|
||||
#include <libinput.h>
|
||||
#include <limits.h>
|
||||
|
|
@ -52,7 +49,6 @@
|
|||
#include <X11/Xlib.h>
|
||||
#include <wlr/xwayland.h>
|
||||
#endif
|
||||
|
||||
#include "util.h"
|
||||
|
||||
/* macros */
|
||||
|
|
@ -236,7 +232,6 @@ static void destroylayersurfacenotify(struct wl_listener *listener, void *data);
|
|||
static void destroynotify(struct wl_listener *listener, void *data);
|
||||
static Monitor *dirtomon(enum wlr_direction dir);
|
||||
static void focusclient(Client *c, int lift);
|
||||
static void focusmon(const Arg *arg);
|
||||
static void focusstack(const Arg *arg);
|
||||
static Client *focustop(Monitor *m);
|
||||
static void fullscreennotify(struct wl_listener *listener, void *data);
|
||||
|
|
@ -248,7 +243,6 @@ static void keypressmod(struct wl_listener *listener, void *data);
|
|||
static void killclient(const Arg *arg);
|
||||
static void maplayersurfacenotify(struct wl_listener *listener, void *data);
|
||||
static void mapnotify(struct wl_listener *listener, void *data);
|
||||
static void monocle(Monitor *m);
|
||||
static void motionabsolute(struct wl_listener *listener, void *data);
|
||||
static void motionnotify(uint32_t time);
|
||||
static void motionrelative(struct wl_listener *listener, void *data);
|
||||
|
|
@ -279,7 +273,6 @@ static void sigchld(int unused);
|
|||
static void spawn(const Arg *arg);
|
||||
static void startdrag(struct wl_listener *listener, void *data);
|
||||
static void tag(const Arg *arg);
|
||||
static void tagmon(const Arg *arg);
|
||||
static void tile(Monitor *m);
|
||||
static void togglefloating(const Arg *arg);
|
||||
static void togglefullscreen(const Arg *arg);
|
||||
|
|
@ -1051,38 +1044,6 @@ createpointer(struct wlr_input_device *device)
|
|||
if (wlr_input_device_is_libinput(device)) {
|
||||
struct libinput_device *libinput_device = (struct libinput_device*)
|
||||
wlr_libinput_get_device_handle(device);
|
||||
|
||||
if (libinput_device_config_tap_get_finger_count(libinput_device)) {
|
||||
libinput_device_config_tap_set_enabled(libinput_device, tap_to_click);
|
||||
libinput_device_config_tap_set_drag_enabled(libinput_device, tap_and_drag);
|
||||
libinput_device_config_tap_set_drag_lock_enabled(libinput_device, drag_lock);
|
||||
}
|
||||
|
||||
if (libinput_device_config_scroll_has_natural_scroll(libinput_device))
|
||||
libinput_device_config_scroll_set_natural_scroll_enabled(libinput_device, natural_scrolling);
|
||||
|
||||
if (libinput_device_config_dwt_is_available(libinput_device))
|
||||
libinput_device_config_dwt_set_enabled(libinput_device, disable_while_typing);
|
||||
|
||||
if (libinput_device_config_left_handed_is_available(libinput_device))
|
||||
libinput_device_config_left_handed_set(libinput_device, left_handed);
|
||||
|
||||
if (libinput_device_config_middle_emulation_is_available(libinput_device))
|
||||
libinput_device_config_middle_emulation_set_enabled(libinput_device, middle_button_emulation);
|
||||
|
||||
if (libinput_device_config_scroll_get_methods(libinput_device) != LIBINPUT_CONFIG_SCROLL_NO_SCROLL)
|
||||
libinput_device_config_scroll_set_method (libinput_device, scroll_method);
|
||||
|
||||
if (libinput_device_config_click_get_methods(libinput_device) != LIBINPUT_CONFIG_CLICK_METHOD_NONE)
|
||||
libinput_device_config_click_set_method (libinput_device, click_method);
|
||||
|
||||
if (libinput_device_config_send_events_get_modes(libinput_device))
|
||||
libinput_device_config_send_events_set_mode(libinput_device, send_events_mode);
|
||||
|
||||
if (libinput_device_config_accel_is_available(libinput_device)) {
|
||||
libinput_device_config_accel_set_profile(libinput_device, accel_profile);
|
||||
libinput_device_config_accel_set_speed(libinput_device, accel_speed);
|
||||
}
|
||||
}
|
||||
|
||||
wlr_cursor_attach_input_device(cursor, device);
|
||||
|
|
@ -1240,17 +1201,6 @@ focusclient(Client *c, int lift)
|
|||
client_activate_surface(client_surface(c), 1);
|
||||
}
|
||||
|
||||
void
|
||||
focusmon(const Arg *arg)
|
||||
{
|
||||
int i = 0, nmons = wl_list_length(&mons);
|
||||
if (nmons)
|
||||
do /* don't switch to disabled mons */
|
||||
selmon = dirtomon(arg->i);
|
||||
while (!selmon->wlr_output->enabled && i++ < nmons);
|
||||
focusclient(focustop(selmon), 1);
|
||||
}
|
||||
|
||||
void
|
||||
focusstack(const Arg *arg)
|
||||
{
|
||||
|
|
@ -1495,20 +1445,6 @@ mapnotify(struct wl_listener *listener, void *data)
|
|||
c->mon->un_map = 1;
|
||||
}
|
||||
|
||||
void
|
||||
monocle(Monitor *m)
|
||||
{
|
||||
Client *c;
|
||||
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
if (!VISIBLEON(c, m) || c->isfloating || c->isfullscreen)
|
||||
continue;
|
||||
resize(c, m->w, 0);
|
||||
}
|
||||
if ((c = focustop(m)))
|
||||
wlr_scene_node_raise_to_top(c->scene);
|
||||
}
|
||||
|
||||
void
|
||||
motionabsolute(struct wl_listener *listener, void *data)
|
||||
{
|
||||
|
|
@ -2286,14 +2222,6 @@ tag(const Arg *arg)
|
|||
printstatus();
|
||||
}
|
||||
|
||||
void
|
||||
tagmon(const Arg *arg)
|
||||
{
|
||||
Client *sel = selclient();
|
||||
if (sel)
|
||||
setmon(sel, dirtomon(arg->i), 0);
|
||||
}
|
||||
|
||||
void
|
||||
tile(Monitor *m)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue