Skip to content

Commit

Permalink
Merge branch 'main' of github.com:rcaelers/workrave
Browse files Browse the repository at this point in the history
  • Loading branch information
rcaelers committed Jan 28, 2024
2 parents ddf1eb2 + 0a59025 commit b347f91
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
8 changes: 6 additions & 2 deletions ui/app/toolkits/gtkmm/BreakWindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ BreakWindow::BreakWindow(std::shared_ptr<IApplicationContext> app,
#if defined(PLATFORM_OS_UNIX)
if (Platform::running_on_wayland())
{
window_manager = std::make_shared<WaylandWindowManager>();
window_manager->init();
auto wm = std::make_shared<WaylandWindowManager>();
bool success = wm->init();
if (success)
{
window_manager = wm;
}
}
#endif

Expand Down
8 changes: 6 additions & 2 deletions ui/app/toolkits/gtkmm/PreludeWindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ PreludeWindow::PreludeWindow(HeadInfo head, BreakId break_id)
#if defined(PLATFORM_OS_UNIX)
if (Platform::running_on_wayland())
{
window_manager = std::make_shared<WaylandWindowManager>();
window_manager->init();
auto wm = std::make_shared<WaylandWindowManager>();
bool success = wm->init();
if (success)
{
window_manager = wm;
}
}
#endif

Expand Down
7 changes: 5 additions & 2 deletions ui/app/toolkits/gtkmm/platforms/unix/WaylandWindowManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,11 @@ void
WaylandWindowManager::init_surface(Gtk::Widget &gtk_window, Glib::RefPtr<Gdk::Monitor> monitor, bool keyboard_focus)
{
TRACE_ENTRY();
auto layer = std::make_shared<LayerSurface>(layer_shell, gtk_window, monitor, keyboard_focus);
surfaces.push_back(layer);
if (layer_shell != nullptr)
{
auto layer = std::make_shared<LayerSurface>(layer_shell, gtk_window, monitor, keyboard_focus);
surfaces.push_back(layer);
}
}

void
Expand Down

0 comments on commit b347f91

Please sign in to comment.