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

Change how fullscreen-compilation deals with new windows during fullscreen #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JeffofBread
Copy link

This addition adds the function fullscreencheck() which changes how the fullscreen client reacts to a new window. Instead of just using losefullscreen(), if the window is fullscreen, it will turn it into a fakefullscreen. If It's already in fakefullscreen, it wont change. This is not meant necessarily to be a final product, but rather just a template or rough code if you wanted to implement something like this.

Code:

Definition:

static void fullscreencheck(Client *c);

Function:

void fullscreencheck(Client *c)
{
    if (!c) return;
    if (c->fakefullscreen == 0 && c->isfullscreen)
        togglefakefullscreen(0);
    else if (c->fakefullscreen == 2)
        togglefullscreen(0);
}

Edit to manage:

fullscreencheck(selmon->sel);

instead of

losefullscreen(c);

in

if (c->mon == selmon) {
	losefullscreen(c);
	unfocus(selmon->sel, 0);
}

@@ -138,10 +139,20 @@ index a96f33c..53f0bd4 100644
+{
+ Client *sel = selmon->sel;
+ if (!sel || !next)
+ return;
Copy link
Author

Choose a reason for hiding this comment

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

Accidental, did not mean to change this tab spacing

@JeffofBread JeffofBread changed the title Change how dwm deals with a new window appearing while a window is fullscreen Change how fullscreen-compilation deals with new windows during fullscreen Jul 27, 2024
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