mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
refactor: fetch outputs from Gtk::Display instead of wl_registry.
gtk-layer-shell wants Gdk::Monitor instead of wl_output; change code to deal with Gdk objects and slightly simplify it. Requires gtkmm 3.22.0+ (first release with Gdk::Monitor support).
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <gdkmm/monitor.h>
|
||||
#include <glibmm/refptr.h>
|
||||
#include <gtkmm/box.h>
|
||||
#include <gtkmm/cssprovider.h>
|
||||
@ -15,10 +16,11 @@ namespace waybar {
|
||||
|
||||
class Factory;
|
||||
struct waybar_output {
|
||||
struct wl_output * output = nullptr;
|
||||
std::string name;
|
||||
uint32_t wl_name;
|
||||
struct zxdg_output_v1 *xdg_output = nullptr;
|
||||
Glib::RefPtr<Gdk::Monitor> monitor;
|
||||
std::string name;
|
||||
|
||||
std::unique_ptr<struct zxdg_output_v1, decltype(&zxdg_output_v1_destroy)> xdg_output = {
|
||||
nullptr, &zxdg_output_v1_destroy};
|
||||
};
|
||||
|
||||
class Bar {
|
||||
|
Reference in New Issue
Block a user