Skip to content

Add hotkeys to tray menu #3

@ghokun

Description

@ghokun

Rectangle provides hot keys as tray menu items:

rectangle

Initial work is here (buttons not working currently, needs work):
https://github.com/ghokun/RectangleWin/commit/61b2cbe46d1118860b5f4e87360e7942e82ac622

buttons

Problems:

  • We need to keep track of active window (or latest active window that can be resizable)
  • I tried to get process id of current window and compare it with RectangleWin process id. Looks like tray menu returns different process id.

Instead of a endless loop, active window changed hook could be used:
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwineventhook?redirectedfrom=MSDN
https://stackoverflow.com/questions/4407631/is-there-windows-system-event-on-active-window-changed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions