Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default implementation for WRegion:current #281

Merged
merged 1 commit into from
May 18, 2020

Conversation

raboof
Copy link
Owner

@raboof raboof commented May 17, 2020

This will automatically implement it for WRootWin, where the active subwindow
will typically be a WScreen.

Follow-up on #275

This will automatically implement it for WRootWin, where the active subwindow
will typically be a WScreen.
@raboof raboof requested a review from wilhelmy May 17, 2020 14:56
@buhl
Copy link
Collaborator

buhl commented May 17, 2020

EDIT: Ignore this. I was on the wrong branch 🌵

I just tested this branch and the change doesn't seem to work
In notionflux

lua> ioncore.current():screen_of():parent():current()
nil
lua> ioncore.current():screen_of():parent():current_scr()
WScreen: 0x5609f8e0e358
lua>

I tried putting back this line
a297424#diff-fc859448b8d4c58d47e4a68b962a268eR498

and it worked again.
so there is something that region_current_default doesn't do right when on WRootWin

@buhl
Copy link
Collaborator

buhl commented May 17, 2020

Now on the right branch I did this in notionflux

lua> repl.inspect_object(ioncore.current():screen_of():parent())
+ WRootWin: 0x55624d56c128
 + WScreen: 0x55624d56c0d8
  + WGroupWS: 0x55624d60e0e8
   + WTiling: 0x55624d46a648
    + WFrame: 0x55624d46a718
     + WGroupCW: 0x55624d60d628
      + WClientWin: 0x55624d619fc8

The repl.inspect_object if one of @wilhelmy repl helper functions runs up and down the object tree.
WRootWin.current now returns a WScreen without calling rootwin_current_scr 👍

Copy link
Collaborator

@buhl buhl left a comment

Choose a reason for hiding this comment

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

@raboof raboof merged commit 6c76b17 into master May 18, 2020
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