taskbar: implement drag-and-drop task reordering

This commit is contained in:
bi4k8
2022-10-25 19:39:23 +00:00
parent 1374b0fce4
commit ff61e7bf4e
2 changed files with 87 additions and 2 deletions

View File

@ -74,6 +74,10 @@ class Task {
std::string app_id_;
uint32_t state_ = 0;
int32_t drag_start_x;
int32_t drag_start_y;
int32_t drag_start_button = -1;
private:
std::string repr() const;
std::string state_string(bool = false) const;
@ -105,6 +109,11 @@ class Task {
/* Callbacks for Gtk events */
bool handle_clicked(GdkEventButton *);
bool handle_button_release(GdkEventButton *);
bool handle_motion_notify(GdkEventMotion *);
void handle_drag_data_get(const Glib::RefPtr<Gdk::DragContext>& context, Gtk::SelectionData& selection_data, guint info, guint time);
void handle_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, Gtk::SelectionData selection_data, guint info, guint time);
public:
bool operator==(const Task &) const;