Skip to content

Conversation

@jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Sep 4, 2024

Fixes #643

TODO

  • Extract what can be done in Gtk3
  • Finish drop onto terminal widget
  • Fix cancelling close tab with foreground process
  • Get tests working (stable, excluding "quit" action test).
  • TerminalWidget: Check match_keycode () works for non-standard keyboard layouts
  • TerminalView: Check drop on add button contains uri-list

Notes:

  • CheckButtons do not seem to work with only an action_target (no action name) in Gtk4 so the theme string is now added as data. Smaller diff than creating an action to change the theme.
  • Theme buttons needed to have different css class names added to them when their provider is added to the display else they overwrite each other. Adding the providers to the buttons own style context did not work.
  • Application tests have been inactivated pending finding out why they do not work under Gtk4. CI now expected to fail for stable and unstable but pass for development target.
  • vte-2.91-gtk4 (?) seems to have a bug in the native handling of copy paste. This did not work as is does under Gtk3 even if the keypress controller was removed. So for now we handle both modes.
  • Since we already have a keycontroller, it is easier to implement keyboard zooming in the handler rather than create zoom actions and Gtk.Shortcuts.
  • Application.add_accels_for_action only works for global action so added shortcuts for terminal actions using a ShortcutController.
  • Ctrl-Scroll Zoom is simplified and is smoother. KeyController is no longer involved. At present any combination of modifiers including <Control> works but that is easily changed if required.
  • Unit tests now all work on the stable build (excluding the "quit" action test)
  • Unit tests other than ApplicationTests also work on unstable and development-target builds

jeremypw and others added 2 commits October 20, 2025 11:46
Whitespace

Co-authored-by: Leo <[email protected]>
Whitespace

Co-authored-by: Leo <[email protected]>
Copy link
Collaborator Author

@jeremypw jeremypw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apply suggestions

jeremypw and others added 5 commits October 20, 2025 11:51
@jeremypw jeremypw requested a review from lenemter October 20, 2025 11:29
jeremypw and others added 3 commits October 21, 2025 16:01
Correct parameter type

Co-authored-by: Leo <[email protected]>
# Conflicts fixed:
#	src/MainWindow.vala
#	src/Widgets/TerminalWidget.vala
@jeremypw jeremypw requested a review from lenemter October 21, 2025 15:56
# Conflicts fixed:
#	src/MainWindow.vala
#	src/Widgets/SettingsPopover.vala
#	src/Widgets/TerminalView.vala
@jeremypw jeremypw changed the title Trial Port to Gtk4 Port to Gtk4 Oct 23, 2025
@jeremypw jeremypw requested a review from lenemter October 23, 2025 14:43
@lenemter
Copy link
Member

Found an interesting bug:

  1. Open settings popover
  2. Disable automatic system theme and select a theme
  3. Close popover and open it again
  4. Start toggling "Auto-Hide tab Bar"
  5. After a while the popover closes and never opens again. When this happens these warnings are produced:
(io.elementary.terminal:39260): Gtk-CRITICAL **: 18:23:05.082: GtkBox 0x5cb2fe443dd0 reports a minimum width of 32, but minimum width for height of 1048576 is 207. Expect overlapping widgets.

(io.elementary.terminal:39260): Gtk-CRITICAL **: 18:23:05.082: GtkBox 0x5cb2fe443dd0 reports a minimum width of 32, but minimum width for height of 1048576 is 207. Expect overlapping widgets.

(io.elementary.terminal:39260): Gtk-CRITICAL **: 18:23:05.082: GtkBox 0x5cb2fe443dd0 reports a minimum width of 32, but minimum width for height of 1048576 is 207. Expect overlapping widgets.

@jeremypw
Copy link
Collaborator Author

@lenemter Couldn't reproduce that bug on Wayland (Secure Session) but it happened on X (Classic Session). It may be an upstream bug. I'll look into it further.

@jeremypw
Copy link
Collaborator Author

jeremypw commented Oct 24, 2025

It seems that bug occurs with any of the toggle switches. It may be related to the revealers associated with them - not sure these are really needed?

Oh, these are part of the Granite.SwitchModelButton so the bug may be there. Not sure its worth changing this widget as X is on the way out.

@jeremypw
Copy link
Collaborator Author

Hmm, triggering this bug under gdb with G_DEBUG=fatal-criticals causes the whole desktop to lockup so cannot get the backtrace. Looks like an upstream bug.

@danirabbit
Copy link
Member

@jeremypw can you resolve conflicts here please?

Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd like to get this merged so we can get some wider testing and watch for regressions and make sure this doesn't just diverge from master and get lost

# Conflicts:
#	src/Widgets/TerminalWidget.vala
@jeremypw
Copy link
Collaborator Author

@danirabbit Conflict fixed. Would you mind if I release v 7.1.3 first as that is almost ready? There is only one PR targeted at it remaining and that could be dropped from the release if necessary.

@danirabbit
Copy link
Member

@jeremypw not at all, though it looks like you have some new features so probably merits a 7.2 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port Terminal to GTK4

5 participants