diff -up easystroke-0.6.0/actiondb.cc.c11 easystroke-0.6.0/actiondb.cc
--- easystroke-0.6.0/actiondb.cc.c11 2013-03-27 11:52:38.000000000 -0400
+++ easystroke-0.6.0/actiondb.cc 2019-10-18 14:46:33.216827179 -0400
@@ -20,6 +20,7 @@
#include <iostream>
#include <fstream>
+#include <string>
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/map.hpp>
@@ -121,7 +122,7 @@ void Command::run() {
pid_t pid = fork();
switch (pid) {
case 0:
- execlp("/bin/sh", "sh", "-c", cmd.c_str(), NULL);
+ execlp("/bin/sh", "sh", "-c", cmd.c_str(), nullptr);
exit(1);
case -1:
printf(_("Error: can't execute command \"%s\": fork() failed\n"), cmd.c_str());
@@ -142,7 +143,7 @@ const Glib::ustring Button::get_label()
const Glib::ustring Misc::get_label() const { return _(types[type]); }
-const char *Misc::types[5] = { N_("None"), N_("Unminimize"), N_("Show/Hide"), N_("Disable (Enable)"), NULL };
+const char *Misc::types[5] = { N_("None"), N_("Unminimize"), N_("Show/Hide"), N_("Disable (Enable)"), nullptr };
template<class Archive> void ActionListDiff::serialize(Archive & ar, const unsigned int version) {
ar & deleted;
diff -up easystroke-0.6.0/actions.cc.c11 easystroke-0.6.0/actions.cc
--- easystroke-0.6.0/actions.cc.c11 2019-10-18 14:46:33.207827369 -0400
+++ easystroke-0.6.0/actions.cc 2019-10-18 14:46:33.216827179 -0400
@@ -193,12 +193,12 @@ Actions::Actions() :
int i = 0;
while (Misc::types[i]) i++;
CellRendererTextish *arg_renderer = cell_renderer_textish_new_with_items ((gchar**)Misc::types, i);
- GtkTreeViewColumn *col_arg = gtk_tree_view_column_new_with_attributes(_("Details"), GTK_CELL_RENDERER (arg_renderer), "text", cols.arg.index(), NULL);
+ GtkTreeViewColumn *col_arg = gtk_tree_view_column_new_with_attributes(_("Details"), GTK_CELL_RENDERER (arg_renderer), "text", cols.arg.index(), nullptr);
gtk_tree_view_append_column(tv.gobj(), col_arg);
- gtk_tree_view_column_set_cell_data_func (col_arg, GTK_CELL_RENDERER (arg_renderer), on_actions_cell_data_arg, this, NULL);
+ gtk_tree_view_column_set_cell_data_func (col_arg, GTK_CELL_RENDERER (arg_renderer), on_actions_cell_data_arg, this, nullptr);
gtk_tree_view_column_set_resizable(col_arg, true);
- g_object_set(arg_renderer, "editable", true, NULL);
+ g_object_set(arg_renderer, "editable", true, nullptr);
g_signal_connect(arg_renderer, "key-edited", G_CALLBACK(on_actions_accel_edited), this);
g_signal_connect(arg_renderer, "combo-edited", G_CALLBACK(on_actions_combo_edited), this);
g_signal_connect(arg_renderer, "edited", G_CALLBACK(on_actions_text_edited), this);
@@ -262,7 +262,7 @@ void Actions::on_cell_data_arg(GtkCellRe
Gtk::TreeModel::iterator iter = tm->get_iter(path);
bool bold = (*iter)[cols.action_bold];
bool deactivated = (*iter)[cols.deactivated];
- g_object_set(cell, "sensitive", !deactivated, "weight", bold ? 700 : 400, NULL);
+ g_object_set(cell, "sensitive", !deactivated, "weight", bold ? 700 : 400, nullptr);
CellRendererTextish *renderer = CELL_RENDERER_TEXTISH (cell);
if (!renderer)
return;
@@ -309,7 +309,7 @@ bool Actions::AppsStore::row_drop_possib
if (model != parent->tm)
return false;
Gtk::TreeIter dest_iter = parent->apps_model->get_iter(dest);
- ActionListDiff *actions = dest_iter ? (*dest_iter)[parent->ca.actions] : (ActionListDiff *)NULL;
+ ActionListDiff *actions = dest_iter ? (*dest_iter)[parent->ca.actions] : (ActionListDiff *)nullptr;
return actions && actions != parent->action_list;
}
@@ -322,7 +322,7 @@ bool Actions::AppsStore::drag_data_recei
return false;
Unique *src_id = (*parent->tm->get_iter(src))[parent->cols.id];
Gtk::TreeIter dest_iter = parent->apps_model->get_iter(dest);
- ActionListDiff *actions = dest_iter ? (*dest_iter)[parent->ca.actions] : (ActionListDiff *)NULL;
+ ActionListDiff *actions = dest_iter ? (*dest_iter)[parent->ca.actions] : (ActionListDiff *)nullptr;
if (!actions || actions == parent->action_list)
return false;
Glib::RefPtr<Gtk::TreeSelection> sel = parent->tv.get_selection();
@@ -752,7 +752,7 @@ void Actions::on_row_activated(const Gtk
}
RStrokeInfo si = action_list->get_info(row[cols.id]);
if (si)
- del->set_sensitive(si->strokes.size());
+ del->set_sensitive(si->strokes.size() != 0);
OnStroke ps(this, dialog, row);
stroke_action.reset(new sigc::slot<void, RStroke>(sigc::mem_fun(ps, &OnStroke::delayed_run)));
diff -up easystroke-0.6.0/gesture.cc.c11 easystroke-0.6.0/gesture.cc
--- easystroke-0.6.0/gesture.cc.c11 2013-03-27 11:52:38.000000000 -0400
+++ easystroke-0.6.0/gesture.cc 2019-10-18 14:46:33.216827179 -0400
@@ -99,7 +99,7 @@ int Stroke::compare(RStroke a, RStroke b
}
return -1;
}
- double cost = stroke_compare(a->stroke.get(), b->stroke.get(), NULL, NULL);
+ double cost = stroke_compare(a->stroke.get(), b->stroke.get(), nullptr, nullptr);
if (cost >= stroke_infinity)
return -1;
score = MAX(1.0 - 2.5*cost, 0.0);
diff -up easystroke-0.6.0/grabber.cc.c11 easystroke-0.6.0/grabber.cc
--- easystroke-0.6.0/grabber.cc.c11 2013-03-27 11:52:38.000000000 -0400
+++ easystroke-0.6.0/grabber.cc 2019-10-18 14:46:33.216827179 -0400
@@ -367,7 +367,7 @@ void Grabber::new_device(XIDeviceInfo *i
}
}
-Grabber::XiDevice::XiDevice(Grabber *parent, XIDeviceInfo *info) : absolute(false), proximity_axis(-1), scale_x(1.0), scale_y(1.0), num_buttons(0) {
+Grabber::XiDevice::XiDevice(Grabber *parent, XIDeviceInfo *info) : absolute(false), active(true), proximity_axis(-1), scale_x(1.0), scale_y(1.0), num_buttons(0) {
static XAtom PROXIMITY(AXIS_LABEL_PROP_ABS_DISTANCE);
dev = info->deviceid;
name = info->name;
@@ -398,7 +398,7 @@ Grabber::XiDevice::XiDevice(Grabber *par
Grabber::XiDevice *Grabber::get_xi_dev(int id) {
DeviceMap::iterator i = xi_devs.find(id);
- return i == xi_devs.end() ? NULL : i->second.get();
+ return i == xi_devs.end() ? nullptr : i->second.get();
}
void Grabber::XiDevice::grab_button(ButtonInfo &bi, bool grab) {
diff -up easystroke-0.6.0/grabber.h.c11 easystroke-0.6.0/grabber.h
--- easystroke-0.6.0/grabber.h.c11 2013-03-27 11:52:38.000000000 -0400
+++ easystroke-0.6.0/grabber.h 2019-10-18 14:46:33.216827179 -0400
@@ -123,7 +123,7 @@ public:
class GrabFailedException : public std::exception {
char *msg;
public:
- GrabFailedException(int code) { if (asprintf(&msg, "Grab Failed: %d", code) == -1) msg = NULL; }
+ GrabFailedException(int code) { if (asprintf(&msg, "Grab Failed: %d", code) == -1) msg = nullptr; }
virtual const char* what() const throw() { return msg ? msg : "Grab Failed"; }
~GrabFailedException() throw() { free(msg); }
};
diff -up easystroke-0.6.0/handler.cc.c11 easystroke-0.6.0/handler.cc
--- easystroke-0.6.0/handler.cc.c11 2019-10-18 14:46:33.214827222 -0400
+++ easystroke-0.6.0/handler.cc 2019-10-18 14:46:33.217827158 -0400
@@ -26,7 +26,7 @@
#include <cmath> // std::abs(float)
using std::abs;
-XState *xstate = NULL;
+XState *xstate = nullptr;
extern Window get_app_window(Window w);
extern Source<Window> current_app_window;
@@ -145,7 +145,7 @@ Window XState::get_window(Window w, Atom
Atom actual_type;
int actual_format;
unsigned long nitems, bytes_after;
- unsigned char *prop_return = NULL;
+ unsigned char *prop_return = nullptr;
if (XGetWindowProperty(dpy, w, prop, 0, sizeof(Atom), False, XA_WINDOW, &actual_type, &actual_format,
&nitems, &bytes_after, &prop_return) != Success)
@@ -161,7 +161,7 @@ Atom XState::get_atom(Window w, Atom pro
Atom actual_type;
int actual_format;
unsigned long nitems, bytes_after;
- unsigned char *prop_return = NULL;
+ unsigned char *prop_return = nullptr;
if (XGetWindowProperty(dpy, w, prop, 0, sizeof(Atom), False, XA_ATOM, &actual_type, &actual_format,
&nitems, &bytes_after, &prop_return) != Success)
@@ -177,7 +177,7 @@ bool XState::has_atom(Window w, Atom pro
Atom actual_type;
int actual_format;
unsigned long nitems, bytes_after;
- unsigned char *prop_return = NULL;
+ unsigned char *prop_return = nullptr;
if (XGetWindowProperty(dpy, w, prop, 0, sizeof(Atom), False, XA_ATOM, &actual_type, &actual_format,
&nitems, &bytes_after, &prop_return) != Success)
@@ -406,7 +406,7 @@ public:
if (xstate->current_dev->master)
XTestFakeMotionEvent(dpy, DefaultScreen(dpy), e->x, e->y, 0);
if (proximity && !xstate->in_proximity)
- parent->replace_child(NULL);
+ parent->replace_child(nullptr);
}
virtual void release(guint b, RTriple e) {
if (xstate->current_dev->master) {
@@ -414,7 +414,7 @@ public:
XTestFakeButtonEvent(dpy, b, false, CurrentTime);
}
if (proximity ? !xstate->in_proximity : !xstate->xinput_pressed.size())
- parent->replace_child(NULL);
+ parent->replace_child(nullptr);
}
virtual std::string name() { return "Ignore"; }
virtual Grabber::State grab_mode() { return Grabber::NONE; }
@@ -445,7 +445,7 @@ public:
if (xstate->current_dev->master)
XTestFakeMotionEvent(dpy, DefaultScreen(dpy), e->x, e->y, 0);
if (proximity && !xstate->in_proximity)
- parent->replace_child(NULL);
+ parent->replace_child(nullptr);
}
virtual void release(guint b, RTriple e) {
if (xstate->current_dev->master) {
@@ -455,14 +455,14 @@ public:
XTestFakeButtonEvent(dpy, b, false, CurrentTime);
}
if (proximity ? !xstate->in_proximity : !xstate->xinput_pressed.size())
- parent->replace_child(NULL);
+ parent->replace_child(nullptr);
}
virtual std::string name() { return "Button"; }
virtual Grabber::State grab_mode() { return Grabber::NONE; }
};
void XState::bail_out() {
- handler->replace_child(NULL);
+ handler->replace_child(nullptr);
xinput_pressed.clear();
XFlush(dpy);
}
@@ -515,7 +515,7 @@ void XState::ping() {
void XState::remove_device(int deviceid) {
if (current_dev && current_dev->dev == deviceid)
- current_dev = NULL;
+ current_dev = nullptr;
}
void XState::ungrab(int deviceid) {
@@ -530,7 +530,7 @@ public:
printf("Warning: %s timed out\n", "WaitForPongHandler");
xstate->bail_out();
}
- virtual void pong() { parent->replace_child(NULL); }
+ virtual void pong() { parent->replace_child(nullptr); }
virtual std::string name() { return "WaitForPong"; }
virtual Grabber::State grab_mode() { return parent->grab_mode(); }
};
@@ -544,7 +544,7 @@ class AbstractScrollHandler : public Han
int orig_x, orig_y;
protected:
- AbstractScrollHandler() : last_t(0), offset_x(0.0), offset_y(0.0) {
+ AbstractScrollHandler() : have_x(false), have_y(false), last_x(0.0), last_y(0.0), last_t(0), offset_x(0.0), offset_y(0.0) {
if (!prefs.move_back.get() || (xstate->current_dev && xstate->current_dev->absolute))
return;
Window dummy1, dummy2;
@@ -633,7 +633,7 @@ public:
}
virtual void raw_motion(RTriple e, bool abs_x, bool abs_y) {
if (proximity && !xstate->in_proximity) {
- parent->replace_child(NULL);
+ parent->replace_child(nullptr);
move_back();
}
if (xstate->xinput_pressed.size())
@@ -663,13 +663,13 @@ public:
}
virtual void release(guint b, RTriple e) {
Handler *p = parent;
- p->replace_child(NULL);
+ p->replace_child(nullptr);
p->release(b, e);
move_back();
}
virtual void press(guint b, RTriple e) {
Handler *p = parent;
- p->replace_child(NULL);
+ p->replace_child(nullptr);
p->press(b, e);
move_back();
}
@@ -691,7 +691,7 @@ public:
if (stroke_action)
(*stroke_action)(s);
if (xstate->xinput_pressed.size() == 0)
- parent->replace_child(NULL);
+ parent->replace_child(nullptr);
}
virtual std::string name() { return "InstantStrokeAction"; }
virtual Grabber::State grab_mode() { return Grabber::NONE; }
@@ -821,7 +821,7 @@ public:
mods.clear();
xstate->fake_click(b);
}
- return parent->replace_child(NULL);
+ return parent->replace_child(nullptr);
}
replay_button = 0;
mods.erase((b == button1) ? button2 : b);
@@ -975,7 +975,7 @@ protected:
if (stroke_action) {
(*stroke_action)(s);
- return parent->replace_child(NULL);
+ return parent->replace_child(nullptr);
}
RRanking ranking;
RAction act = actions.get_action_list(grabber->current_class->get())->handle(s, ranking);
@@ -983,7 +983,7 @@ protected:
Ranking::queue_show(ranking, e);
if (!act) {
XkbBell(dpy, None, 0, None);
- return parent->replace_child(NULL);
+ return parent->replace_child(nullptr);
}
RModifiers mods = act->prepare();
if (IS_CLICK(act))
@@ -1008,7 +1008,7 @@ protected:
unsetenv("EASYSTROKE_Y1");
unsetenv("EASYSTROKE_X2");
unsetenv("EASYSTROKE_Y2");
- parent->replace_child(NULL);
+ parent->replace_child(nullptr);
}
public:
StrokeHandler(guint b, RTriple e) :
@@ -1098,7 +1098,7 @@ std::string XState::select_window() {
return grabber->current_class->get();
}
-XState::XState() : current_dev(NULL), in_proximity(false), accepted(true) {
+XState::XState() : current_dev(nullptr), in_proximity(false), accepted(true), modifiers(0) {
int n, opcode, event, error;
char **ext = XListExtensions(dpy, &n);
for (int i = 0; i < n; i++)
diff -up easystroke-0.6.0/handler.h.c11 easystroke-0.6.0/handler.h
--- easystroke-0.6.0/handler.h.c11 2013-03-27 11:52:38.000000000 -0400
+++ easystroke-0.6.0/handler.h 2019-10-18 14:46:33.217827158 -0400
@@ -59,7 +59,7 @@ public:
bool accepted;
std::set<guint> xinput_pressed;
guint modifiers;
- std::map<guint, guint> core_inv_map;
+ std::map<guint, guint> core_inv_map;
private:
Window ping_window;
Handler *handler;
@@ -76,7 +76,7 @@ class Handler {
public:
Handler *child;
Handler *parent;
- Handler() : child(NULL), parent(NULL) {}
+ Handler() : child(nullptr), parent(nullptr) {}
Handler *top() {
if (child)
return child->top();
diff -up easystroke-0.6.0/main.cc.c11 easystroke-0.6.0/main.cc
--- easystroke-0.6.0/main.cc.c11 2019-10-18 14:46:33.213827243 -0400
+++ easystroke-0.6.0/main.cc 2019-10-18 14:46:33.217827158 -0400
@@ -42,11 +42,11 @@ extern Source<bool> disabled;
bool experimental = false;
int verbosity = 0;
-const char *prefs_versions[] = { "-0.5.5", "-0.4.1", "-0.4.0", "", NULL };
-const char *actions_versions[] = { "-0.5.6", "-0.4.1", "-0.4.0", "", NULL };
+const char *prefs_versions[] = { "-0.5.5", "-0.4.1", "-0.4.0", "", nullptr };
+const char *actions_versions[] = { "-0.5.6", "-0.4.1", "-0.4.0", "", nullptr };
Source<Window> current_app_window(None);
std::string config_dir;
-Win *win = NULL;
+Win *win = nullptr;
Display *dpy;
Window ROOT;
@@ -172,7 +172,7 @@ void sig_int(int) {
class App : public Gtk::Application, Base {
public:
App(int& argc, char**& argv, const Glib::ustring& application_id, Gio::ApplicationFlags flags=Gio::APPLICATION_FLAGS_NONE) :
- Gtk::Application(argc, argv, application_id, flags), remote(false) {}
+ Gtk::Application(argc, argv, application_id, flags), remote(false), enabled(nullptr) {}
~App();
static void usage(const char *me);
@@ -380,7 +380,7 @@ void App::on_activate() {
signal(SIGINT, &sig_int);
signal(SIGCHLD, SIG_IGN);
- dpy = XOpenDisplay(NULL);
+ dpy = XOpenDisplay(nullptr);
if (!dpy) {
printf(_("Couldn't open display.\n"));
exit(EXIT_FAILURE);
@@ -400,7 +400,7 @@ void App::on_activate() {
trace.reset(init_trace());
Glib::RefPtr<Gdk::Screen> screen = Gdk::Display::get_default()->get_default_screen();
- g_signal_connect(screen->gobj(), "composited-changed", &schedule_reload_trace, NULL);
+ g_signal_connect(screen->gobj(), "composited-changed", &schedule_reload_trace, nullptr);
screen->signal_size_changed().connect(sigc::ptr_fun(&schedule_reload_trace));
Notifier *trace_notify = new Notifier(sigc::ptr_fun(&schedule_reload_trace));
prefs.trace.connect(trace_notify);
@@ -462,7 +462,7 @@ void App::create_config_dir() {
config_dir += "/.easystroke";
}
struct stat st;
- char *name = realpath(config_dir.c_str(), NULL);
+ char *name = realpath(config_dir.c_str(), nullptr);
// check if the directory does not exist
if (lstat(name, &st) == -1) {
@@ -633,7 +633,7 @@ class Modifiers : Timeout {
Glib::ustring str;
OSD *osd;
public:
- Modifiers(guint mods_, Glib::ustring str_) : mods(mods_), str(str_), osd(NULL) {
+ Modifiers(guint mods_, Glib::ustring str_) : mods(mods_), str(str_), osd(nullptr) {
if (prefs.show_osd.get())
set_timeout(150);
all.insert(this);
diff -up easystroke-0.6.0/prefs.cc.c11 easystroke-0.6.0/prefs.cc
--- easystroke-0.6.0/prefs.cc.c11 2013-03-27 11:52:38.000000000 -0400
+++ easystroke-0.6.0/prefs.cc 2019-10-18 14:46:33.217827158 -0400
@@ -299,9 +299,9 @@ Prefs::Prefs() {
CellRendererTextish *button_renderer = cell_renderer_textish_new ();
button_renderer->mode = CELL_RENDERER_TEXTISH_MODE_Popup;
- GtkTreeViewColumn *col_button = gtk_tree_view_column_new_with_attributes(_("Button"), GTK_CELL_RENDERER (button_renderer), "text", cols.button.index(), NULL);
+ GtkTreeViewColumn *col_button = gtk_tree_view_column_new_with_attributes(_("Button"), GTK_CELL_RENDERER (button_renderer), "text", cols.button.index(), nullptr);
gtk_tree_view_append_column(tv->gobj(), col_button);
- g_object_set(button_renderer, "editable", true, NULL);
+ g_object_set(button_renderer, "editable", true, nullptr);
g_signal_connect(button_renderer, "editing-started", G_CALLBACK(on_prefs_editing_started), this);
bbutton->signal_clicked().connect(sigc::mem_fun(*this, &Prefs::on_select_button));
diff -up easystroke-0.6.0/shape.cc.c11 easystroke-0.6.0/shape.cc
--- easystroke-0.6.0/shape.cc.c11 2013-03-27 11:52:38.000000000 -0400
+++ easystroke-0.6.0/shape.cc 2019-10-18 14:46:33.217827158 -0400
@@ -73,7 +73,7 @@ void Shape::timeout() {
}
void Shape::clear() {
- XShapeCombineRectangles(dpy, win, ShapeBounding, 0, 0, NULL, 0, ShapeSet, YXBanded);
+ XShapeCombineRectangles(dpy, win, ShapeBounding, 0, 0, nullptr, 0, ShapeSet, YXBanded);
}
Shape::~Shape() {
diff -up easystroke-0.6.0/stats.cc.c11 easystroke-0.6.0/stats.cc
--- easystroke-0.6.0/stats.cc.c11 2013-03-27 11:52:38.000000000 -0400
+++ easystroke-0.6.0/stats.cc 2019-10-18 14:46:33.217827158 -0400
@@ -280,7 +280,7 @@ void Stats::on_pdf() {
printf("creating table took %ld us\n", (tv2.tv_sec - tv1.tv_sec)*1000000 + tv2.tv_usec - tv1.tv_usec);
}
if (!fork()) {
- execlp("xdg-open", "xdg-open", "/tmp/strokes.pdf", NULL);
+ execlp("xdg-open", "xdg-open", "/tmp/strokes.pdf", nullptr);
exit(EXIT_FAILURE);
}
}
diff -up easystroke-0.6.0/util.h.c11 easystroke-0.6.0/util.h
--- easystroke-0.6.0/util.h.c11 2013-03-27 11:52:38.000000000 -0400
+++ easystroke-0.6.0/util.h 2019-10-18 14:46:33.218827137 -0400
@@ -19,11 +19,11 @@
#include <glibmm.h>
class Timeout {
- // Invariant: c == &connection || c == NULL
+ // Invariant: c == &connection || c == nullptr
sigc::connection *c;
sigc::connection connection;
// We have to account for the possibilty that timeout() destroys the object
- bool to() { c = NULL; timeout(); return false; }
+ bool to() { c = nullptr; timeout(); return false; }
public:
Timeout() : c(0) {}
protected:
diff -up easystroke-0.6.0/var.h.c11 easystroke-0.6.0/var.h
--- easystroke-0.6.0/var.h.c11 2013-03-27 11:52:38.000000000 -0400
+++ easystroke-0.6.0/var.h 2019-10-18 14:46:33.218827137 -0400
@@ -24,6 +24,7 @@
class Base {
public:
virtual void notify() = 0;
+ virtual ~Base() {}
};
class Notifier : public Base {
@@ -53,11 +54,13 @@ protected:
public:
void connect(Base *s) { out.insert(s); }
virtual T get() const = 0;
+ virtual ~Out() {}
};
template <class T> class In {
public:
virtual void set(const T x) = 0;
+ virtual ~In() {}
};
template <class T> class IO : public In<T>, public Out<T> {};
diff -up easystroke-0.6.0/win.cc.c11 easystroke-0.6.0/win.cc
--- easystroke-0.6.0/win.cc.c11 2019-10-18 14:46:33.210827306 -0400
+++ easystroke-0.6.0/win.cc 2019-10-18 14:46:33.218827137 -0400
@@ -220,7 +220,7 @@ void Win::show_hide_icon() {
icon->signal_activate().connect(sigc::mem_fun(*this, &Win::show_hide));
icon->signal_popup_menu().connect(sigc::mem_fun(*this, &Win::show_popup));
if (gtk_major_version > 2 || (gtk_major_version == 2 && gtk_minor_version >= 15))
- g_signal_connect(icon->gobj(), "button-release-event", G_CALLBACK(icon_clicked), NULL);
+ g_signal_connect(icon->gobj(), "button-release-event", G_CALLBACK(icon_clicked), nullptr);
} else {
if (icon)
icon.reset();