diff options
| author | Devin J. Pohly <djpohly@gmail.com> | |
|---|---|---|
| 2020-04-23 23:14:15 -0500 | ||
| committer | Devin J. Pohly <djpohly@gmail.com> | |
| 2020-04-23 23:44:54 -0500 | ||
| commit | 2cb526bbd923383ae903130478033f3403bc5351 (patch) | |
| tree | cb7d4a23234a93eda7c621aa9a72829ed9d1a75a /dwl.c | |
| parent | eafd317eecacf0dc824bb80f6bbd52fe8892bf6a (diff) | |
| download | dwl-2cb526bbd923383ae903130478033f3403bc5351.tar.gz dwl-2cb526bbd923383ae903130478033f3403bc5351.tar.bz2 dwl-2cb526bbd923383ae903130478033f3403bc5351.zip | |
add chvt function
It truly isn't just a window manager anymore :-|
@@ -126,6 +126,7 @@ struct render_data { static void arrange(Monitor *m); static void axisnotify(struct wl_listener *listener, void *data); static void buttonpress(struct wl_listener *listener, void *data); +static void chvt(const Arg *arg); static void createkeyboard(struct wlr_input_device *device); static void createmon(struct wl_listener *listener, void *data); static void createnotify(struct wl_listener *listener, void *data); @@ -230,6 +231,15 @@ axisnotify(struct wl_listener *listener, void *data) } void +chvt(const Arg *arg) +{ + struct wlr_session *s = wlr_backend_get_session(backend); + if (!s) + return; + wlr_session_change_vt(s, arg->ui); +} + +void buttonpress(struct wl_listener *listener, void *data) { /* This event is forwarded by the cursor when a pointer emits a button |