Skip to content

2337 allow resize the drop down terminal - #2338

Closed
anhtumai wants to merge 5 commits into
Guake:masterfrom
anhtumai:2337_allow_resize_the_drop_down_terminal
Closed

2337 allow resize the drop down terminal#2338
anhtumai wants to merge 5 commits into
Guake:masterfrom
anhtumai:2337_allow_resize_the_drop_down_terminal

Conversation

@anhtumai

@anhtumai anhtumai commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Please follow these steps before submitting a new Pull Request to Guake:

  • rebase on latest HEAD:

    $ git pull --rebase upstream master
  • hack your change

  • to execute the code styling, checks and unit tests:

    $ make style check reno-lint test
  • describe your change in a slug file for automatic release note
    generation, using:

    $ make reno SLUG=<short_name_of_my_feature>

    and edit the created file in releasenotes/notes/.
    You can see how reno works using pipenv run reno --help.

    Please use a generic slug (eg, for translation update,
    use translation, for bugfix use bugfix,...)

  • create new commit message

    $ <hack the code>
    $ git commit --all
  • If your change is related to a GitHub issue, you can add a reference
    using #123 where 123 is the ID of the issue.
    You can use closes #123 to have GitHub automatically close the issue
    when your contribution get merged

  • Semantic commit is supported (and recommended). Add one of the following
    line in your commit messages:

    # For a bug fix, uses:
    sem-ver: bugfix
    
    # For a new feature, uses:
    sem-ver: feature
    
    # Please do not use the 'breaking change' syntax (`sem-ver: api-break`),
    # it is reserved for really big reworks
    

@anhtumai
anhtumai force-pushed the 2337_allow_resize_the_drop_down_terminal branch from c6ebd70 to f324c13 Compare August 2, 2026 19:11
@anhtumai

anhtumai commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Allow resizing the drop-down terminal by dragging its bottom edge

closes #2337

Summary

Similar to Windows Terminal, this lets you resize Guake's drop-down window by dragging its bottom edge — handy for temporarily expanding the terminal to read long command output without leaving the drop-down view.

  • Enable decorated on the main window (guake.glade) so the window manager provides a native border, which makes it grabbable/draggable on the bottom edge.

  • Debounce configure-event on the main window (300ms) to detect when a drag-resize has settled, and record the resulting height/width as percentages of the monitor workarea (Guake.on_window_configure / on_resize_debounced in guake_app.py).

  • Store that as an in-memory SettingsOverride (guake/utils.py) that RectCalculator.set_final_window_rect prefers over the persisted window-height/window-width gsettings values, without writing them back to gsettings — so the size holds for the rest of the session (surviving hide/show via F12) without permanently changing your configured default.

  • If you explicitly change height/width/alignment via Preferences, accel_increase_height/decrease_height, or dconf, the override is dropped (GSettingHandler.size_changed/alignment_changed in gsettings.py) so the persisted setting takes priority again, as expected.

Notes

  • The Fluxbox show() workaround previously re-triggered the window-height changed signal to force a re-apply; that would now also clear the override, so it was changed to call RectCalculator.set_final_window_rect directly instead, preserving the original Fluxbox fix without disturbing the in-session override.

  • Also bumped the black/flake8/pylint pre-commit hook revisions, which were badly out of date and crashing under modern Python (old black referenced ast.Str, removed in Python 3.12+).

Testing

  • make style check test
  • Manually: drag the bottom edge to resize, hide/show (F12) and confirm the size sticks; then change the height via Preferences and confirm that takes over cleanly.

@anhtumai
anhtumai force-pushed the 2337_allow_resize_the_drop_down_terminal branch 5 times, most recently from 3b42820 to 65717ec Compare August 2, 2026 20:34
@anhtumai

anhtumai commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Demo of my PR:

Screencast.From.2026-08-03.17-31-56.mp4

@Davidy22

Copy link
Copy Markdown
Collaborator

I notice from both my testing and your video that this change introduces an unnecessary titlebar. That's going to have to get cleaned up before I merge this.

@anhtumai

Copy link
Copy Markdown
Contributor Author

Thank you for your respone. I will look at it tonight or this weekend

@anhtumai
anhtumai force-pushed the 2337_allow_resize_the_drop_down_terminal branch 4 times, most recently from 808b81f to 6c9b2f6 Compare August 15, 2026 17:48
@anhtumai

Copy link
Copy Markdown
Contributor Author

@Davidy22 I have fixed the code.
Here is the new demo , when I have removed the title bar. You can check in guake.glade that the code is same as before, except for glade version changed

Screencast.From.2026-08-15.20-49-42.mp4

@anhtumai
anhtumai force-pushed the 2337_allow_resize_the_drop_down_terminal branch from 6c9b2f6 to f93a747 Compare August 15, 2026 17:53
@anhtumai

anhtumai commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

About the title bar, actually I prefer to keep it, because it has options to: Move to monitor (Up/Down/Left/Right). So we can move the Guake terminal to other places, not stuck in one place. What do you think about this @Davidy22 ?

image

If you agree, I will keep the titlebar, since it improves user experience a lot

Another solution is to make another issue to fix: Move Guake terminal to wherever cursor last clicks, but it will be much harder to do than just enabling the titlebar by setting: decorated=True

@anhtumai

Copy link
Copy Markdown
Contributor Author

About the title bar, actually I prefer to keep it, because it has options to: Move to monitor (Up/Down/Left/Right). So we can move the Guake terminal to other places, not stuck in one place. What do you think about this @Davidy22 ?

image

If you agree, I will keep the titlebar, since it improves user experience a lot

Another solution is to make another issue to fix: Move Guake terminal to wherever cursor last clicks, but it will be much harder to do than just enabling the titlebar by setting: decorated=True

@Davidy22 sorry for direct ping. But can you give your feedback here?

@Davidy22 Davidy22 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Adding a title bar changes the program quite substantially, is out of scope for this PR, and jars with how it's supposed to be a panel that pulls down from the top.

Flagged things I noticed, also the temporary override mechanism's a point of discussion. Size changes not being reflected in the preferences menu is going to be a bit unintuitive. Also need to consider what merits usage of the temporary settings, why would dragging the window edge count for a temporary change, but CTRL+up/down doesn't?

I would lean heavy towards cutting the temporary settings mechanism and just having the window edge dragging alter the general window size setting. If you want to make a case for doing it this way, at the very least the window size keyboard shortcuts fulfil a very similar role to this and should also use the same mechanism.

Comment thread guake/guake_app.py

# Window is undecorated (no WM title bar/borders), so provide a thin
# drag handle at the bottom edge to let users resize it manually.
# This is for issue: https://github.com/Guake/guake/issues/2337

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Don't put issue numbers in comments, just describe what the code does.

Comment thread guake/guake_app.py
self.prev_accel_search_terminal_time = 0.0

# holds the GLib source id for the pending resize-debounce timeout
# used to capture resizing activities for https://github.com/Guake/guake/issues/2337

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Similar deal

Comment thread guake/data/guake.glade
<object class="GtkMenu" id="tray-menu">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is a convention change to go with the glade version bump I presume?

Comment thread .pre-commit-config.yaml
exclude: COPYING
- repo: https://github.com/PyCQA/flake8.git
rev: 3.9.2
rev: 7.3.0

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Don't change our linter versions. Out of scope, do this in another PR.

@anhtumai

Copy link
Copy Markdown
Contributor Author

Adding a title bar changes the program quite substantially, is out of scope for this PR, and jars with how it's supposed to be a panel that pulls down from the top.

Flagged things I noticed, also the temporary override mechanism's a point of discussion. Size changes not being reflected in the preferences menu is going to be a bit unintuitive. Also need to consider what merits usage of the temporary settings, why would dragging the window edge count for a temporary change, but CTRL+up/down doesn't?

I would lean heavy towards cutting the temporary settings mechanism and just having the window edge dragging alter the general window size setting. If you want to make a case for doing it this way, at the very least the window size keyboard shortcuts fulfil a very similar role to this and should also use the same mechanism.

Thank you . I will modify the logic to align with existing implementation

…o that users can drag the bottom bar of drop-down terminal up and down to adjust its height
… can hide titlebar like before, and create a custom GTK event box in the bottom so users can drag the bottom bar up and down
@anhtumai
anhtumai force-pushed the 2337_allow_resize_the_drop_down_terminal branch from f93a747 to b953ed2 Compare August 20, 2026 19:59
@anhtumai anhtumai closed this Aug 21, 2026
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.

2 participants