Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

feat: onfocus and onfocuslost in eventbox#1364

Draft
RelativeAlbatros wants to merge 1 commit intoelkowar:masterfrom
RelativeAlbatros:master
Draft

feat: onfocus and onfocuslost in eventbox#1364
RelativeAlbatros wants to merge 1 commit intoelkowar:masterfrom
RelativeAlbatros:master

Conversation

@RelativeAlbatros
Copy link

@RelativeAlbatros RelativeAlbatros commented Jul 30, 2025

Description

I'm currently working on implementing focus event handling. this code is not yet compilable.
I need assistance with checking whether a widget gains or loses focus using the EventFocus struct in order to set the state flags.

Usage

possible usecase: close a widget/window when it loses focus
(defwidget example-widget :onhoverlost "${EWW_CMD} close example-widget")

Additional notes

I couldn't find the documentation file

Checklist

Please make sure you can check all the boxes that apply to this PR.

  • All widgets I've added are correctly documented.
  • I added my changes to CHANGELOG.md, if appropriate.
  • The documentation in the docs/content/main directory has been adjusted to reflect my changes.
  • I used cargo fmt to automatically format all code before committing

I'm currently working on implementing focus event handling.
this code is not yet compilable.
I need assistance with checking whether a widget gains or loses focus
using the EventFocus struck in order to set the state flags.

possible usecase: close a widget/window when it loses focus
@RelativeAlbatros RelativeAlbatros marked this pull request as draft August 1, 2025 15:33
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.

1 participant