Merge pull request #2417 from Cherser-s/sni-click-coordinate-fix

sni: fix passing relative coordinates to dbus methods
This commit is contained in:
Alexis Rouillard
2023-09-04 22:01:04 +02:00
committed by GitHub
4 changed files with 66 additions and 4 deletions

View File

@ -91,6 +91,9 @@ class Bar {
bool vertical = false;
Gtk::Window window;
int x_global;
int y_global;
#ifdef HAVE_SWAY
std::string bar_id;
#endif
@ -102,11 +105,16 @@ class Bar {
void setupAltFormatKeyForModule(const std::string &module_name);
void setupAltFormatKeyForModuleList(const char *module_list_name);
void setMode(const bar_mode &);
void onConfigure(GdkEventConfigure *ev);
void configureGlobalOffset(int width, int height);
void onOutputGeometryChanged();
/* Copy initial set of modes to allow customization */
bar_mode_map configured_modes = PRESET_MODES;
std::string last_mode_{MODE_DEFAULT};
struct bar_margins margins_;
std::unique_ptr<BarSurface> surface_impl_;
Gtk::Box left_;
Gtk::Box center_;

View File

@ -84,6 +84,8 @@ class Item : public sigc::trackable {
// visibility of items with Status == Passive
bool show_passive_ = false;
const Bar& bar_;
Glib::RefPtr<Gio::DBus::Proxy> proxy_;
Glib::RefPtr<Gio::Cancellable> cancellable_;
std::set<std::string_view> update_pending_;