[PR #202] [CLOSED] Gtk - Wayland backend support (WiP) #226

Closed
opened 2026-05-05 03:43:24 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ultimatepp/ultimatepp/pull/202
Author: @klugier
Created: 8/25/2024
Status: Closed

Base: masterHead: klugier/gdk-backend-in-about-box


📝 Commits (8)

📊 Changes

14 files changed (+166 additions, -28 deletions)

View changed files

📝 uppsrc/CtrlCore/CtrlCore.upp (+1 -0)
uppsrc/CtrlCore/GdkBackend.cpp (+61 -0)
📝 uppsrc/CtrlCore/Gtk.h (+15 -0)
📝 uppsrc/CtrlCore/GtkAfter.h (+3 -2)
📝 uppsrc/CtrlCore/GtkApp.cpp (+13 -6)
📝 uppsrc/CtrlCore/GtkCreate.cpp (+5 -3)
📝 uppsrc/CtrlCore/GtkCtrl.cpp (+4 -0)
📝 uppsrc/CtrlCore/GtkCtrl.h (+1 -1)
📝 uppsrc/CtrlCore/GtkEvent.cpp (+4 -0)
📝 uppsrc/CtrlCore/GtkTop.cpp (+1 -1)
📝 uppsrc/CtrlCore/GtkWnd.cpp (+38 -8)
📝 uppsrc/CtrlCore/GtkX11Util.cpp (+15 -4)
📝 uppsrc/CtrlCore/X11App.cpp (+1 -1)
📝 uppsrc/ide/About.cpp (+4 -2)

📄 Description

This PR:

  • Adds mechanisms to obtain GDK backend at runtime
  • Displaying the name of the backend in aboutbxo
  • Added support for detecting C++23 in About box

Tested on both X11 and Wayland and it works as expected. To test in on Wayland there is a need to modify CtrlCore/GtkApp.cpp and modify InitGtkApp function

#if GTK_CHECK_VERSION(3, 10, 0)
	gdk_set_allowed_backends("wayland,x11"); // this fixes wayland issues
#endif

In above code wayland is not there for obvious reasons. We are still heavely basing on X11.


Makefile needs to be updated after pushing it to the master branch.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ultimatepp/ultimatepp/pull/202 **Author:** [@klugier](https://github.com/klugier) **Created:** 8/25/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `klugier/gdk-backend-in-about-box` --- ### 📝 Commits (8) - [`4a97abf`](https://github.com/ultimatepp/ultimatepp/commit/4a97abf67b4a884b91a7757312c4d3f09dc77bdb) Obtaining Gtk backend and runtime and displaying it in About box. - [`64a42e3`](https://github.com/ultimatepp/ultimatepp/commit/64a42e3d06ed1398b869c9b97c703aad0b88d318) .fixes - [`a91a7f5`](https://github.com/ultimatepp/ultimatepp/commit/a91a7f5d721fdd41bc0438d6a1ce03755802a33f) .csometics - [`b92247d`](https://github.com/ultimatepp/ultimatepp/commit/b92247dc137961be68185dc87c4cf327ade14907) Initial iteration for GTK on Wayland. Works suprisingly stable. - [`485ce91`](https://github.com/ultimatepp/ultimatepp/commit/485ce913ca4b93c03f72d354f74e129494eaaacd) Disable X11Utils when Wayland backend detected. - [`6dcd8af`](https://github.com/ultimatepp/ultimatepp/commit/6dcd8af5e94f9a87609a7e798313b6a80e9f2f0c) Cosmetics - [`da23296`](https://github.com/ultimatepp/ultimatepp/commit/da23296672c776a6d481e9b4fd149ff493b7a9ca) Merge branch 'master' of https://github.com/ultimatepp/ultimatepp into klugier/gdk-backend-in-about-box - [`810d3f9`](https://github.com/ultimatepp/ultimatepp/commit/810d3f978a8592f616a8f0bc8f18188d8fb7a245) Better handling of popups. ### 📊 Changes **14 files changed** (+166 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `uppsrc/CtrlCore/CtrlCore.upp` (+1 -0) ➕ `uppsrc/CtrlCore/GdkBackend.cpp` (+61 -0) 📝 `uppsrc/CtrlCore/Gtk.h` (+15 -0) 📝 `uppsrc/CtrlCore/GtkAfter.h` (+3 -2) 📝 `uppsrc/CtrlCore/GtkApp.cpp` (+13 -6) 📝 `uppsrc/CtrlCore/GtkCreate.cpp` (+5 -3) 📝 `uppsrc/CtrlCore/GtkCtrl.cpp` (+4 -0) 📝 `uppsrc/CtrlCore/GtkCtrl.h` (+1 -1) 📝 `uppsrc/CtrlCore/GtkEvent.cpp` (+4 -0) 📝 `uppsrc/CtrlCore/GtkTop.cpp` (+1 -1) 📝 `uppsrc/CtrlCore/GtkWnd.cpp` (+38 -8) 📝 `uppsrc/CtrlCore/GtkX11Util.cpp` (+15 -4) 📝 `uppsrc/CtrlCore/X11App.cpp` (+1 -1) 📝 `uppsrc/ide/About.cpp` (+4 -2) </details> ### 📄 Description This PR: - Adds mechanisms to obtain GDK backend at runtime - Displaying the name of the backend in aboutbxo - Added support for detecting C++23 in About box Tested on both X11 and Wayland and it works as expected. To test in on Wayland there is a need to modify CtrlCore/GtkApp.cpp and modify InitGtkApp function ``` #if GTK_CHECK_VERSION(3, 10, 0) gdk_set_allowed_backends("wayland,x11"); // this fixes wayland issues #endif ``` In above code wayland is not there for obvious reasons. We are still heavely basing on X11. -------------- Makefile needs to be updated after pushing it to the master branch. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 03:43:24 -06:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/ultimatepp#226
No description provided.