mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 21:05:58 +01:00
Remvoed unnecessary wayland socket in examples
This commit is contained in:
parent
167ca57b18
commit
7f1230fe78
4 changed files with 2 additions and 29 deletions
|
@ -395,13 +395,7 @@ int main(int argc, char *argv[]) {
|
||||||
image->width, image->height, image->hotspot_x, image->hotspot_y, 0);
|
image->width, image->height, image->hotspot_x, image->hotspot_y, 0);
|
||||||
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &state.last_frame);
|
clock_gettime(CLOCK_MONOTONIC, &state.last_frame);
|
||||||
const char *socket = wl_display_add_socket_auto(display);
|
|
||||||
if (!socket) {
|
|
||||||
wlr_log_errno(L_ERROR, "Unable to open wayland socket");
|
|
||||||
wlr_backend_destroy(wlr);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
setenv("_WAYLAND_DISPLAY", socket, true);
|
|
||||||
if (!wlr_backend_start(wlr)) {
|
if (!wlr_backend_start(wlr)) {
|
||||||
wlr_log(L_ERROR, "Failed to start backend");
|
wlr_log(L_ERROR, "Failed to start backend");
|
||||||
wlr_backend_destroy(wlr);
|
wlr_backend_destroy(wlr);
|
||||||
|
|
|
@ -248,13 +248,6 @@ int main(int argc, char *argv[]) {
|
||||||
wl_signal_add(&wlr->events.new_input, &state.new_input);
|
wl_signal_add(&wlr->events.new_input, &state.new_input);
|
||||||
state.new_input.notify = new_input_notify;
|
state.new_input.notify = new_input_notify;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &state.last_frame);
|
clock_gettime(CLOCK_MONOTONIC, &state.last_frame);
|
||||||
const char *socket = wl_display_add_socket_auto(display);
|
|
||||||
if (!socket) {
|
|
||||||
wlr_log_errno(L_ERROR, "Unable to open wayland socket");
|
|
||||||
wlr_backend_destroy(wlr);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
setenv("_WAYLAND_DISPLAY", socket, true);
|
|
||||||
|
|
||||||
state.renderer = wlr_backend_get_renderer(wlr);
|
state.renderer = wlr_backend_get_renderer(wlr);
|
||||||
if (!state.renderer) {
|
if (!state.renderer) {
|
||||||
|
|
|
@ -165,13 +165,7 @@ int main() {
|
||||||
wl_signal_add(&wlr->events.new_input, &state.new_input);
|
wl_signal_add(&wlr->events.new_input, &state.new_input);
|
||||||
state.new_input.notify = new_input_notify;
|
state.new_input.notify = new_input_notify;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &state.last_frame);
|
clock_gettime(CLOCK_MONOTONIC, &state.last_frame);
|
||||||
const char *socket = wl_display_add_socket_auto(display);
|
|
||||||
if (!socket) {
|
|
||||||
wlr_log_errno(L_ERROR, "Unable to open wayland socket");
|
|
||||||
wlr_backend_destroy(wlr);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
setenv("_WAYLAND_DISPLAY", socket, true);
|
|
||||||
if (!wlr_backend_start(wlr)) {
|
if (!wlr_backend_start(wlr)) {
|
||||||
wlr_log(L_ERROR, "Failed to start backend");
|
wlr_log(L_ERROR, "Failed to start backend");
|
||||||
wlr_backend_destroy(wlr);
|
wlr_backend_destroy(wlr);
|
||||||
|
|
|
@ -273,14 +273,6 @@ int main(int argc, char *argv[]) {
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *socket = wl_display_add_socket_auto(display);
|
|
||||||
if (!socket) {
|
|
||||||
wlr_log_errno(L_ERROR, "Unable to open wayland socket");
|
|
||||||
wlr_backend_destroy(wlr);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
setenv("_WAYLAND_DISPLAY", socket, true);
|
|
||||||
|
|
||||||
if (!wlr_backend_start(wlr)) {
|
if (!wlr_backend_start(wlr)) {
|
||||||
wlr_log(L_ERROR, "Failed to start backend");
|
wlr_log(L_ERROR, "Failed to start backend");
|
||||||
wlr_backend_destroy(wlr);
|
wlr_backend_destroy(wlr);
|
||||||
|
|
Loading…
Reference in a new issue