refactor(bar): separate GTK event handlers for gtk-layer-shell

Cleanly separate resizing logic for gtk-layer-shell and manually managed
layer surface code.
This commit is contained in:
Aleksei Bavshin
2020-08-09 18:58:01 -07:00
parent 591eb2ea38
commit 3663b9193d
2 changed files with 89 additions and 45 deletions

View File

@ -53,13 +53,18 @@ class Bar {
static void layerSurfaceHandleClosed(void *, struct zwlr_layer_surface_v1 *);
#ifdef HAVE_GTK_LAYER_SHELL
/* gtk-layer-shell code */
void initGtkLayerShell();
void onConfigureGLS(GdkEventConfigure *ev);
void onMapGLS(GdkEventAny *ev);
#endif
/* fallback layer-surface code */
void onConfigure(GdkEventConfigure *ev);
void onRealize();
void onMap(GdkEventAny *ev);
void setExclusiveZone(uint32_t width, uint32_t height);
void setSurfaceSize(uint32_t width, uint32_t height);
/* common code */
void setExclusiveZone(uint32_t width, uint32_t height);
auto setupWidgets() -> void;
void getModules(const Factory &, const std::string &);
void setupAltFormatKeyForModule(const std::string &module_name);