Code Monkey home page Code Monkey logo

Comments (8)

wilhelmy avatar wilhelmy commented on August 15, 2024

About the first point:

lua> mod_sp.is_scratchpad(ioncore.current():manager():manager())
true

This seems to identify scratchpad windows. Now my approach would be to put a check like this into ioncore/fullscreen.c, but it shouldn't include code from mod_sp. So what's the alternative? Wrap the keybinding for Mod+f or whatever is the fullscreen keybinding in a lua wrapper? @raboof

from notion.

wilhelmy avatar wilhelmy commented on August 15, 2024

I've come up with the following code:

function toggle_fullscreen(arg)
	local parent = arg:parent()
	local r = WGroup.set_fullscreen(arg, 'toggle')
	if mod_sp and mod_sp.is_scratchpad(parent) then
		mod_sp.set_shown_on(arg:manager(), 'toggle')
	end
	return r
end

defbindings("WGroupCW", {
    bdoc("Toggle client window group full-screen mode"),
    kpress_wait(META.."F", "toggle_fullscreen(_)"),
})

Opinions?

Edit: It does however not solve the second half of my issue, namely that returning a scratchpad window from fullscreen returns it to the right scratchpad but in front of the wrong workspace.

from notion.

mjf avatar mjf commented on August 15, 2024

@wilhelmy This solves the case when you use specific key binding to toggle full-screen mode of a window but it does not solve the cases when the application toggles to full-screen itself such as Alt-Enter in XTerm of F in MPlayer etc.

from notion.

wilhelmy avatar wilhelmy commented on August 15, 2024

Thanks, I guess fixing it correctly is a bit more involved. The main problem I haven't solved is that I want to avoid adding a dependency to mod_sp to the core code handling fullscreen.

from notion.

raboof avatar raboof commented on August 15, 2024

Thanks, I guess fixing it correctly is a bit more involved. The main problem I haven't solved is that I want to avoid adding a dependency to mod_sp to the core code handling fullscreen.

Do you think it's still a net improvement to merge it?

from notion.

wilhelmy avatar wilhelmy commented on August 15, 2024

I wouldn't want to merge this snippet into the default config in this state, because everyone would need to edit their config in order to use it and the real fix would then make all those config changes obsolete again. I think it can live in this issue until we have a complete fix, and people who care about it can use it locally?

from notion.

mjf avatar mjf commented on August 15, 2024

I've come up with the following code:

Opinions?

Hello @wilhelmy,
have you tried it with multiple workspaces? I've just tried it on a screen with 2 workspaces, one tiled and the second one "empty". When I open a scratch pad and a terminal in it, then press META+F, the terminal gets fullscreen but when I pres META+F again to "unfullscreen" it I end up in the second workspace (the scratchpad shows OK with the terminal "swallowed" again in it, but it appears on a wrong workspace). I am not sure why this is... The issue occurs only if META+F toggled application is in scratchpad, otherwise it seems to work correctly.

from notion.

wilhelmy avatar wilhelmy commented on August 15, 2024

Furthermore when switching fullscreened scratchpad window back to its normal size, the scratchpad gets focused correctly but is put in front of the wrong desktop, rather than the last active one.

@mjf that's the second part of this issue for which I unfortunately haven't had the time to diagnose it yet.

from notion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.