[PR #205] [MERGED] Initial version of GTK Wayland backend #229

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

📋 Pull Request Information

Original PR: https://github.com/ultimatepp/ultimatepp/pull/205
Author: @klugier
Created: 9/22/2024
Status: Merged
Merged: 2/2/2025
Merged by: @mirek-fidler

Base: masterHead: klugier/gtk-wayland-initial-version


📝 Commits (10+)

📊 Changes

18 files changed (+390 additions, -76 deletions)

View changed files

📝 uppsrc/CtrlCore/CtrlCore.h (+3 -0)
📝 uppsrc/CtrlCore/CtrlCore.upp (+2 -0)
📝 uppsrc/CtrlCore/CtrlDraw.cpp (+2 -1)
uppsrc/CtrlCore/GdkBackend.cpp (+67 -0)
📝 uppsrc/CtrlCore/Gtk.h (+46 -3)
📝 uppsrc/CtrlCore/GtkAfter.h (+3 -2)
📝 uppsrc/CtrlCore/GtkApp.cpp (+20 -10)
uppsrc/CtrlCore/GtkCSD.cpp (+82 -0)
📝 uppsrc/CtrlCore/GtkCreate.cpp (+51 -18)
📝 uppsrc/CtrlCore/GtkCtrl.cpp (+4 -2)
📝 uppsrc/CtrlCore/GtkCtrl.h (+2 -2)
📝 uppsrc/CtrlCore/GtkEvent.cpp (+6 -1)
📝 uppsrc/CtrlCore/GtkTop.cpp (+5 -5)
📝 uppsrc/CtrlCore/GtkWnd.cpp (+77 -22)
📝 uppsrc/CtrlCore/GtkX11Util.cpp (+17 -8)
📝 uppsrc/CtrlCore/X11App.cpp (+1 -1)
📝 uppsrc/ide/About.cpp (+1 -1)
📝 uppsrc/ide/ide.upp (+1 -0)

📄 Description

This PR enable Wayland on GTK back-end. The Wayland is secondary back-end by default. It means that without launching it explicitly in Wayland session it won't be turn on. However running upp application with having set environemnt GDK_BACKEND=wayland should enable GTK Wayland backend in Wayland session for all Upp applications. Alternatively, I added flagWAYLAND which allows to force selection of GTK Wayland back-end once provided.

Other significant things done in this PR:

  • Support client side decorations (CSD). This is required for Wayland compositors that doesn't provide server side decorations (SSD). The good example of such compositor is Mutter (GNOME)

Things to implement in the future PR's:

  • Fix GetWorkArea(). GetWorkArea() should returns TopWindow size since the idea of GetWorkArea on Wayland doesn't exist. Fix in progress. However, this will require changes in U++ public API, so I would like to push it in separate PR.
  • Fix issue with popups. Popups should base on xdg_popup, it should be achieved with creating gtk_menu instead of creatign special window type

I tested this PR in various scenarios as sessions. However, the chance for regression is high. So, I highly recommend to merge these changes after release 2024.1. Also, please merge with squash option to make history clean.


🔄 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/205 **Author:** [@klugier](https://github.com/klugier) **Created:** 9/22/2024 **Status:** ✅ Merged **Merged:** 2/2/2025 **Merged by:** [@mirek-fidler](https://github.com/mirek-fidler) **Base:** `master` ← **Head:** `klugier/gtk-wayland-initial-version` --- ### 📝 Commits (10+) - [`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 - [`b61d318`](https://github.com/ultimatepp/ultimatepp/commit/b61d3184fb353541706daff128f4577c06eec2dc) .native - [`e59b14c`](https://github.com/ultimatepp/ultimatepp/commit/e59b14c8afa68a7d4cbcaafb97fc9e646a6afd1c) First iteration of CSD. - [`606960f`](https://github.com/ultimatepp/ultimatepp/commit/606960fccca0a5ff3c5991491d9eff19c1050e68) .working - [`c2d0f96`](https://github.com/ultimatepp/ultimatepp/commit/c2d0f961f44aff8c74ef4498796152fbc731703f) Merge branch 'master' of https://github.com/ultimatepp/ultimatepp into klugier/gdk-backend-in-about-box-native-header ### 📊 Changes **18 files changed** (+390 additions, -76 deletions) <details> <summary>View changed files</summary> 📝 `uppsrc/CtrlCore/CtrlCore.h` (+3 -0) 📝 `uppsrc/CtrlCore/CtrlCore.upp` (+2 -0) 📝 `uppsrc/CtrlCore/CtrlDraw.cpp` (+2 -1) ➕ `uppsrc/CtrlCore/GdkBackend.cpp` (+67 -0) 📝 `uppsrc/CtrlCore/Gtk.h` (+46 -3) 📝 `uppsrc/CtrlCore/GtkAfter.h` (+3 -2) 📝 `uppsrc/CtrlCore/GtkApp.cpp` (+20 -10) ➕ `uppsrc/CtrlCore/GtkCSD.cpp` (+82 -0) 📝 `uppsrc/CtrlCore/GtkCreate.cpp` (+51 -18) 📝 `uppsrc/CtrlCore/GtkCtrl.cpp` (+4 -2) 📝 `uppsrc/CtrlCore/GtkCtrl.h` (+2 -2) 📝 `uppsrc/CtrlCore/GtkEvent.cpp` (+6 -1) 📝 `uppsrc/CtrlCore/GtkTop.cpp` (+5 -5) 📝 `uppsrc/CtrlCore/GtkWnd.cpp` (+77 -22) 📝 `uppsrc/CtrlCore/GtkX11Util.cpp` (+17 -8) 📝 `uppsrc/CtrlCore/X11App.cpp` (+1 -1) 📝 `uppsrc/ide/About.cpp` (+1 -1) 📝 `uppsrc/ide/ide.upp` (+1 -0) </details> ### 📄 Description This PR enable Wayland on GTK back-end. The Wayland is secondary back-end by default. It means that without launching it explicitly in Wayland session it won't be turn on. However running upp application with having set environemnt `GDK_BACKEND=wayland` should enable GTK Wayland backend in Wayland session for all Upp applications. Alternatively, I added flagWAYLAND which allows to force selection of GTK Wayland back-end once provided. Other significant things done in this PR: - Support client side decorations (CSD). This is required for Wayland compositors that doesn't provide server side decorations (SSD). The good example of such compositor is Mutter (GNOME) Things to implement in the future PR's: - Fix GetWorkArea(). GetWorkArea() should returns TopWindow size since the idea of GetWorkArea on Wayland doesn't exist. Fix in progress. However, this will require changes in U++ public API, so I would like to push it in separate PR. - Fix issue with popups. Popups should base on xdg_popup, it should be achieved with creating gtk_menu instead of creatign special window type ------------------- I tested this PR in various scenarios as sessions. However, the chance for regression is high. So, I highly recommend to merge these changes after release 2024.1. Also, please merge with squash option to make history clean. --- <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:25 -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#229
No description provided.