Announcement

Collapse
No announcement yet.

Kwin window rules -- 'apply initially' never works?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Kwin window rules -- 'apply initially' never works?

    (Apologies if this has been fixed in 19.04 -- I'm still on 18.10 but this has been going on for years so I assume it's still an issue.)

    I use window rules a lot, and "force" always works as expected, but has the downside of being enforce for the duration of the window's life.

    "Apply Initially" sounds from everything I read to be exactly what I want, but it never, ever, seems to have any sometimes has no effect. Am I missing something? I basically want the results of "force" but I want them to stop being forced once the window has been placed.

    Thanks for any insight!
    Last edited by chconnor; Jun 16, 2019, 01:26 PM.

    #2
    Are you using this as a window rule, or an application rule?
    I think sometimes if it is a window rule, the 'window matching' may need to be more specific, or tweaked.

    What sort of rule are you looking at, and is it for specific programs? Non-KDE programs may or may not honor these rules properly, too.

    I used to use custom rules for Kodi, specifically to have it start out as a maximized window, with no border or title bar (not full-screen) , so I could easily minimize or switch from "TV mode' to desktop things as alt-tabbing Kodi did not work very well when it was full-screen. This was 17.10/18.04-ish. I don't use it now, as my Android TV box runs it quite well.

    Comment


      #3
      Thanks for the response -- this is a rule in Window Management -> Window Rules; under "Window matching" I'm using "blender" as the "Exact Match"; trying other variants doesn't seem to affect things... I think the window matching is OK, though, since if I use "Force" in the rule it works fine? Or maybe you are saying that the window class changes as the app starts up?

      My rule is setting the size and position of the window (Blender doesn't properly remember it's size/position across multiple monitors).

      I note that for "Appearance & Fixes" I set the "no titlebar and frame" as "apply initially" and it works fine... so I wonder if Blender itself is setting its position and size after kwin "applies" it "initially", so it's just a timing issue?

      I used to think that "Force Temporarily" was supposed to get around that potential issue, but I take it "Force Temporarily" is a "force it once, on the next invocation of the program" and not "force it for a second when the app starts", which might be a useful thing to have for situations like mine?

      Comment


        #4
        have you tried it with an application rule instead of a window rule?

        Anyway, Blender may simply not be honoring the rules fully, or screen/monitor position.
        Otherwise, I am out of clues

        Comment


          #5
          Thanks -- what do you mean by "application rule", exactly?

          Comment


            #6
            When you right-click on a title bar, you get the "More Actions..." menu that shows window control options, including both "Special Window Settings" and "Special Application Settings"

            These really are the same thing, but if you look at the Window Matching tab, there will be a bit more info and options checked/filled in already, which may make a difference, perhaps.
            Have you looked to see if Blender itself has any settings? I know they have custom ,layouts you can use, create, or download, so maybe something there might help.

            Comment


              #7
              Thanks --so, hmmm, progress made... I think my .config/kwinrulesrc might have been corrupted from past bugs or something... editing the rules to be identical to each other resulted in one of them working and the other not... (examining the difference in the config file revealed extra lines in the non-working entry) but I can make a new rule and it works that way.

              The catch is that my two monitors adjoined have 3200 pixels of horizontal width. Setting the X position to 0 and width to 3200 does not work (window just appears full-screened on a single monitor); setting the width to 3199 does work. So, perhaps a fence-post error in some "protective" code trying to make sure windows aren't too big, or something to that effect.

              I'll live without that extra pixel for now. :-) Thanks for the help.

              Edit: yeah, blender has lots of configs, but it does not recall window size/position over multiple monitors, unfortunately. Using multiple windows is an option, but you lose a lot of the UI perks of having a single window (namely that focus issues become a problem. At least this was true in 2.79... I haven't tested recently, but I assumed it was a window manager thing more than a blender thing...)

              Comment

              Working...
              X