Skip to content

Commit

Permalink
Require wlroots 0.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
keithbowes committed Nov 22, 2023
1 parent 7fb889d commit bceafa5
Show file tree
Hide file tree
Showing 18 changed files with 310 additions and 405 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
- name: packages
run: |
apk add clang gcc libevdev-dev libinput-dev libxkbcommon-dev libxml2-dev meson musl-dev wayland-dev wayland-protocols wlroots-dev xwayland
# actions/checkout@v3 clones the repository
- uses: actions/checkout@v3
# actions/checkout@v4 clones the repository
- uses: actions/checkout@v4
- name: build-gcc
run: |
CC=gcc meson setup build-gcc
Expand Down
23 changes: 0 additions & 23 deletions include/waybox/output.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef _WB_OUTPUT_H
#define _WB_OUTPUT_H

#include <stdlib.h>
#include <time.h>

#include "waybox/server.h"
Expand Down Expand Up @@ -32,28 +31,6 @@ struct wb_output {
struct wl_list link;
};

struct wb_view {
struct wl_list link;
struct wb_server *server;
struct wlr_xdg_toplevel *xdg_toplevel;
struct wlr_scene_tree *scene_tree;

struct wlr_xdg_toplevel_decoration_v1 *decoration;

struct wl_listener map;
struct wl_listener unmap;
struct wl_listener destroy;
struct wl_listener new_popup;
struct wl_listener request_fullscreen;
struct wl_listener request_maximize;
struct wl_listener request_minimize;
struct wl_listener request_move;
struct wl_listener request_resize;

struct wlr_box geometry;
struct wlr_box previous_geometry;
};

void handle_gamma_control_set_gamma(struct wl_listener *listener, void *data);
void output_frame_notify(struct wl_listener *listener, void *data);
void output_destroy_notify(struct wl_listener *listener, void *data);
Expand Down
8 changes: 5 additions & 3 deletions include/waybox/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <wlr/types/wlr_xdg_shell.h>
#include <wlr/util/log.h>

#include <stdlib.h>

#ifdef USE_NLS
# include <libintl.h>
# include <locale.h>
Expand All @@ -34,7 +36,7 @@
#include "waybox/cursor.h"
#include "decoration.h"
#include "layer_shell.h"
#include "waybox/output.h"
#include "waybox/xdg_shell.h"
#include "waybox/seat.h"

struct wb_server {
Expand All @@ -58,11 +60,11 @@ struct wb_server {
struct wb_cursor *cursor;
struct wb_seat *seat;

struct wb_view *grabbed_view;
struct wb_toplevel *grabbed_toplevel;
struct wlr_box grab_geo_box;
double grab_x, grab_y;
uint32_t resize_edges;
struct wl_list views;
struct wl_list toplevels;

struct wlr_layer_shell_v1 *layer_shell;
struct wlr_xdg_shell *xdg_shell;
Expand Down
28 changes: 25 additions & 3 deletions include/waybox/xdg_shell.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,32 @@

#include "waybox/server.h"

struct wb_toplevel {
struct wl_list link;
struct wb_server *server;
struct wlr_xdg_toplevel *xdg_toplevel;
struct wlr_scene_tree *scene_tree;

struct wlr_xdg_toplevel_decoration_v1 *decoration;

struct wl_listener map;
struct wl_listener unmap;
struct wl_listener destroy;
struct wl_listener new_popup;
struct wl_listener request_fullscreen;
struct wl_listener request_maximize;
struct wl_listener request_minimize;
struct wl_listener request_move;
struct wl_listener request_resize;

struct wlr_box geometry;
struct wlr_box previous_geometry;
};

void init_xdg_shell(struct wb_server *server);
void focus_view(struct wb_view *view, struct wlr_surface *surface);
struct wlr_output *get_active_output(struct wb_view *view);
struct wb_view *get_view_at(
void focus_toplevel(struct wb_toplevel *toplevel, struct wlr_surface *surface);
struct wlr_output *get_active_output(struct wb_toplevel *toplevel);
struct wb_toplevel *get_toplevel_at(
struct wb_server *server, double lx, double ly,
struct wlr_surface **surface, double *sx, double *sy);
#endif
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ inc_dir = include_directories('include')
libevdev = dependency('libevdev')
libinput = dependency('libinput', version: '>=1.21.0')
libxml2 = dependency('libxml-2.0')
wlroots = dependency('wlroots', version: '>=0.16.0')
wlroots = dependency('wlroots', version: '>=0.17.0')
wayland_server = dependency('wayland-server', version: '>=1.15')
wayland_protos = dependency('wayland-protocols', version: '>=1.27')
xkbcommon = dependency('xkbcommon')
Expand Down
22 changes: 13 additions & 9 deletions po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Waybox 0.0.1\n"
"Report-Msgid-Bugs-To: https://github.com/wizbright/waybox/issues\n"
"POT-Creation-Date: 2022-12-06 22:27-0500\n"
"PO-Revision-Date: 2022-12-06 22:30-0500\n"
"POT-Creation-Date: 2023-11-21 15:47-0500\n"
"PO-Revision-Date: 2023-11-21 12:49-0500\n"
"Last-Translator: Volker Ribbert <[email protected]>\n"
"Language-Team: <[email protected]>\n"
"Language: de\n"
Expand All @@ -39,14 +39,14 @@ msgstr "Kein nodeset"
msgid ""
"Unable to parse the configuration file. Consult stderr for more information."
msgstr ""
"Kann nicht die Einstullungsdatei analisieren. Für mehr Informationen die "
"Kann nicht die Einstellungsdatei analisieren. Für weitere Informationen die "
"Standardfehlerausgabe lesen."

msgid "Couldn't create new context!"
msgstr "Konnte einen neuen Zusammenhang nicht erstellen"
msgstr "Konnte keinen neuen Zusammenhang erstellen"

msgid "Couldn't register the namespace"
msgstr "Konte dem Namensnraum nicht registrieren"
msgstr "Konnte dem Namensraum nicht registrieren"

#, c-format
msgid "Syntax: %s [options]\n"
Expand Down Expand Up @@ -118,8 +118,8 @@ msgstr "Der Server wurde nicht erfolgreich gestartet"
msgid "New output device detected"
msgstr "Neue Ausgabegerät entdeckt"

msgid "Couldn't commit pending frame to output"
msgstr "Konnte sich nicht an den anstehenden Rahmen an die Ausgabe eintragen"
msgid "Could not add an output layout."
msgstr "Konnte keine neue Ausgabenanordnung hinzufügen."

msgid "New keyboard detected"
msgstr "Neue Tastatur entdeckt"
Expand Down Expand Up @@ -151,8 +151,12 @@ msgstr "Display zerstört"
msgid "Keyboard focus is now on surface"
msgstr "Tastaturfokus ist jetzt auf Oberfläche"

msgid "Focusing next view"
msgstr "Fokussiert nächste Ansicht"
msgid "Focusing next toplevel"
msgstr "Fokussiert nächstes Spitzenniveau"

#~ msgid "Couldn't commit pending frame to output"
#~ msgstr ""
#~ "Konnte sich nicht an den anstehenden Rahmen an die Ausgabe eintragen"

#, fuzzy
#~ msgid "Failed to create wlr_backend"
Expand Down
29 changes: 16 additions & 13 deletions po/eo.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Waybox 0.0.1\n"
"Report-Msgid-Bugs-To: https://github.com/wizbright/waybox/issues\n"
"POT-Creation-Date: 2022-12-06 22:27-0500\n"
"PO-Revision-Date: 2022-12-06 22:33-0500\n"
"POT-Creation-Date: 2023-11-21 15:47-0500\n"
"PO-Revision-Date: 2023-11-21 15:58-0500\n"
"Last-Translator: Keith <keith@localhost>\n"
"Language-Team: Esperanto\n"
"Language: eo\n"
Expand All @@ -24,7 +24,7 @@ msgid "ERROR: No configuration file found."
msgstr "ERARO: Neniu agordo-dosiero trovita."

msgid "Unable to evaluate expression"
msgstr "Ne povas taksi esprimon"
msgstr "Ne eblis taksi esprimon"

msgid "No nodesetval"
msgstr "Neniu nodara valoro"
Expand All @@ -41,7 +41,7 @@ msgid "Couldn't create new context!"
msgstr "Ne povis krei novan kuntekston!"

msgid "Couldn't register the namespace"
msgstr "Ne povas registri lo nomspacon"
msgstr "Ne eblis registri la nomspacon"

#, c-format
msgid "Syntax: %s [options]\n"
Expand Down Expand Up @@ -98,13 +98,13 @@ msgstr "%s postulas argumenton\n"

#, c-format
msgid "%s hasn't been implemented yet.\n"
msgstr "%s ankoraŭ ne estas efektigita.\n"
msgstr "%s ankoraŭ ne estas efektivigita.\n"

msgid "Successfully created backend"
msgstr "Sukcese kreis servilan dorson"

msgid "Failed to create backend"
msgstr "Malsukesis krei servilan dorson"
msgstr "Malsukcesis krei servilan dorson"

msgid "Successfully started server"
msgstr "Sukcese startigis servilon"
Expand All @@ -115,8 +115,8 @@ msgstr "Malsukcesis startigi servilon"
msgid "New output device detected"
msgstr "Nova enigilo malkovrita"

msgid "Couldn't commit pending frame to output"
msgstr "Ne povis surmeti atendantan framon sur eligon"
msgid "Could not add an output layout."
msgstr "Ne eblis aldoni eligan aranĝon."

msgid "New keyboard detected"
msgstr "Nova klavaro malkovrita"
Expand All @@ -131,13 +131,13 @@ msgid "Failed to connect to a Wayland display"
msgstr "Malsukcesis konektiĝi al Wayland-ekrano"

msgid "Failed to create renderer"
msgstr "Malsukesis krei servilan bildigilon"
msgstr "Malsukcesis krei servilan bildigilon"

msgid "Failed to create allocator"
msgstr "Malsukesis krei servilan asignilon"
msgstr "Malsukcesis krei servilan asignilon"

msgid "Failed to start backend"
msgstr "Malsukesis startigi servilan dorson"
msgstr "Malsukcesis startigi servilan dorson"

msgid "Running Wayland compositor on Wayland display"
msgstr "Plenumas Wayland-komponilon sur Wayland-ekrano"
Expand All @@ -148,8 +148,11 @@ msgstr "Ekrano finigita"
msgid "Keyboard focus is now on surface"
msgstr "Klavara fokuso nun estas sur surfaco"

msgid "Focusing next view"
msgstr "Fokusas la sekvan vidon"
msgid "Focusing next toplevel"
msgstr "Fokusas la sekvan supran nivelon"

#~ msgid "Couldn't commit pending frame to output"
#~ msgstr "Ne eblis surmeti atendantan framon sur eligon"

#, fuzzy
#~ msgid "Failed to create wlr_backend"
Expand Down
6 changes: 3 additions & 3 deletions po/waybox.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: waybox\n"
"Report-Msgid-Bugs-To: https://github.com/wizbright/waybox/issues\n"
"POT-Creation-Date: 2022-12-06 22:27-0500\n"
"POT-Creation-Date: 2023-11-21 15:47-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -107,7 +107,7 @@ msgstr ""
msgid "New output device detected"
msgstr ""

msgid "Couldn't commit pending frame to output"
msgid "Could not add an output layout."
msgstr ""

msgid "New keyboard detected"
Expand Down Expand Up @@ -140,5 +140,5 @@ msgstr ""
msgid "Keyboard focus is now on surface"
msgstr ""

msgid "Focusing next view"
msgid "Focusing next toplevel"
msgstr ""
4 changes: 2 additions & 2 deletions protocol/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ protocols = [
[wl_protocol_dir, 'unstable/xdg-decoration/xdg-decoration-unstable-v1.xml'],
[wl_protocol_dir, 'unstable/xdg-output/xdg-output-unstable-v1.xml'],
'wlr-gamma-control-unstable-v1.xml',
'wlr-screencopy-unstable-v1.xml',
'wlr-layer-shell-unstable-v1.xml',
'wlr-screencopy-unstable-v1.xml',
]

client_protocols = [
[wl_protocol_dir, 'unstable/idle-inhibit/idle-inhibit-unstable-v1.xml'],
'wlr-screencopy-unstable-v1.xml',
'wlr-layer-shell-unstable-v1.xml',
'wlr-screencopy-unstable-v1.xml',
]

wl_protos_src = []
Expand Down
Loading

0 comments on commit bceafa5

Please sign in to comment.