# Toggle Pin/Unpin focused window

**URL:** <https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313>\
**Category:** Bugs or Unexpected Behavior\
**Created:** [September 19, 2023, 1:32pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313 "2023-09-19T13:32:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jordikt](https://community.folivora.ai/user_avatar/community.folivora.ai/jordikt/32/26021_2.png) [@jordikt](https://community.folivora.ai/u/jordikt)\
**Post date:** [September 19, 2023, 1:32pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/1 "2023-09-19T13:32:50Z")

</div>

I have assigned the action "Toggle Pin/Unpin focused window" to the shortcut "cmd+U".

If I move a window after pinning it, the window is shown twice (one is shown in the original position and the other in the new position). Furthermore, it looses the floating on top behaviour, it becomes normal window.

If I unpin the window and pin it again without moving it, it is also shown twice.

Here is a small video showing the bug using 2 windows in Chrome (the [apple.com](http://apple.com) window is the pinned one):

[/uploads/default/original/3X/4/e/4e6cdafe1f8592751915c221f6a4bb6ccb2f350d.mp4](https://community.folivora.ai/uploads/default/original/3X/4/e/4e6cdafe1f8592751915c221f6a4bb6ccb2f350d.mp4)

* * *

**Device information:**

- Macbook Pro 16 2021 M1Max
- Ventura 13.5.2
- BetterTouchTool version 4.266

---

<div class="post-metadata">

**Author:** ![Frank1](https://community.folivora.ai/letter_avatar_proxy/v4/letter/f/a87d85/32.png) [@Frank1](https://community.folivora.ai/u/Frank1)\
**Post date:** [September 19, 2023, 2:20pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/2 "2023-09-19T14:20:42Z")

</div>

Oops, it's the same with me. This is probably a bug after the feature extension of this action.

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [September 19, 2023, 3:03pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/3 "2023-09-19T15:03:34Z")

</div>

You are right, sorry! Could you check whether 4.267 works correctly?

---

<div class="post-metadata">

**Author:** ![jordikt](https://community.folivora.ai/user_avatar/community.folivora.ai/jordikt/32/26021_2.png) [@jordikt](https://community.folivora.ai/u/jordikt)\
**Post date:** [September 19, 2023, 3:22pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/4 "2023-09-19T15:22:55Z")

</div>

Hi @Andreas_Hegenberg

It's fixed in 4.268

But there is another issue I see. Description:

- Window 1 is pinned
- Window 2 is not pinned
- Window 2 has the focus
- The cursor pass over the window 1 and the focus is set to window 1 (without click)

Is this by design or a bug? It seems that the normal behaviour is to click the pinned window to change the focus, isn't it?

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [September 19, 2023, 3:27pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/5 "2023-09-19T15:27:43Z")

</div>

Unfortunately that's by design, macOS doesn't offer any real way to make a window floating, that's why BTT creates a floating "stream" of the original window and places it at the position of the original window.

Now that stream does not react to mouse events, thus BTT needs to bring focus to the original window when moving the mouse over the replica.

I could offer an option to only change focus when clicking the replica stream. Maybe that could be useful for some people.

---

<div class="post-metadata">

**Author:** ![jordikt](https://community.folivora.ai/user_avatar/community.folivora.ai/jordikt/32/26021_2.png) [@jordikt](https://community.folivora.ai/u/jordikt)\
**Post date:** [September 19, 2023, 3:50pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/6 "2023-09-19T15:50:51Z")

</div>

> [@Andreas\_Hegenberg](#):
>
> I could offer an option to only change focus when clicking the replica stream. Maybe that could be useful for some people.

Yes, I think that's necessary. I use software (DAW Cubase as example) with some windows that can be set "on top" or "normal" (pinned or unpinned), and they only get focus if you click on them. That's the normal or intuitive behaviour, IMHO.

Usually the pinned windows are useful to look to them as you are working on other window who has the focus. In these cases you "rarely" need to give the focus to the pinned window, you need to have it on top to see it, but you are working on other windows. Hope you understand what I mean.

---

<div class="post-metadata">

**Author:** ![Frank1](https://community.folivora.ai/letter_avatar_proxy/v4/letter/f/a87d85/32.png) [@Frank1](https://community.folivora.ai/u/Frank1)\
**Post date:** [September 19, 2023, 4:45pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/7 "2023-09-19T16:45:32Z")

</div>

> [@jordikt](#):
>
> and they only get focus if you click on them.

I hadn't noticed that until now, but it's true. This option might actually help.

> [@jordikt](#):
>
> Usually the pinned windows are useful to look to them as you are working on other window who has the focus. In these cases you "rarely" need to give the focus to the pinned window, you need to have it on top to see it, but you are working on other windows.

Not necessarily. I often write in pinned windows. If I just want to "look" a screenshot is enough.

And don't forget, the result can only be perfect if an app makes its own windows float. BTT can do that with the windows of any app. That's pretty unique. So we should take what we get. 🙂

---

<div class="post-metadata">

**Author:** ![Frank1](https://community.folivora.ai/letter_avatar_proxy/v4/letter/f/a87d85/32.png) [@Frank1](https://community.folivora.ai/u/Frank1)\
**Post date:** [September 19, 2023, 5:33pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/8 "2023-09-19T17:33:14Z")

</div>

Mm, what I don't understand: the "Scrivener" window is natively floating. Apparently it can be in focus at the same time as the Finder window behind it. Even the cursor blinks in both.

 ![image](https://community.folivora.ai/uploads/default/original/3X/3/0/307423e2912d7284101a720ff184dd0c1797a5bc.png)

---

<div class="post-metadata">

**Author:** ![jordikt](https://community.folivora.ai/user_avatar/community.folivora.ai/jordikt/32/26021_2.png) [@jordikt](https://community.folivora.ai/u/jordikt)\
**Post date:** [September 19, 2023, 5:56pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/9 "2023-09-19T17:56:00Z")

</div>

> [@Frank1](#):
>
> Not necessarily. I often write in pinned windows

The benefit of a pinned window is to not be hidden when it looses the focus.

In other words, is useful to pin a window if you want to see the whole window all time, especially when it looses the focus.

You can pin a window to write in it, but in the case that this pinned window is the only pinned window in your screen, what is the benefit you get? You will see the same with this window configured as pinned or unpinned, isn't it?

If great master @Andreas_Hegenberg can do it, a pinned window should work like any other normal window. It should get the focus when user click on it, not when the cursor hovers it.

---

<div class="post-metadata">

**Author:** ![Frank1](https://community.folivora.ai/letter_avatar_proxy/v4/letter/f/a87d85/32.png) [@Frank1](https://community.folivora.ai/u/Frank1)\
**Post date:** [September 19, 2023, 6:20pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/10 "2023-09-19T18:20:28Z")

</div>

> [@jordikt](#):
>
> The benefit of a pinned window is to not be hidden when it looses the focus.
> 
> In other words, is useful to pin a window if you want to see the whole window all time, especially when it looses the focus.

Mm ... yes.

> [@jordikt](#):
>
> You can pin a window to write in it, but in the case that this pinned window is the only pinned window in your screen, what is the benefit you get? You will see the same with this window configured as pinned or unpinned, isn't it?

Mm, no. Not if the pinned window is a small note window that sits on top of a maximize browser window.

> [@jordikt](#):
>
> If great master @Andreas_Hegenberg can do it, a pinned window should work like any other normal window. It should get the focus when user click on it, not when the cursor hovers it.

This is the important part and we totally agree on that. 😉

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [September 19, 2023, 7:39pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/11 "2023-09-19T19:39:02Z")

</div>

I have experimented a bit, and I think the new option works pretty well (v4.270):

 ![image](https://community.folivora.ai/uploads/default/original/3X/0/f/0f16db46fd810cb719c4a3cc4782420717a1bb0c.jpeg)

It will never behave like a normal window, but maybe better than before.

---

<div class="post-metadata">

**Author:** ![Frank1](https://community.folivora.ai/letter_avatar_proxy/v4/letter/f/a87d85/32.png) [@Frank1](https://community.folivora.ai/u/Frank1)\
**Post date:** [September 19, 2023, 7:52pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/12 "2023-09-19T19:52:54Z")

</div>

After the first test ... I find it much better! no more annoying flickering. The focus even comes with the scroll gesture, clicking is not even necessary, but possible.

---

<div class="post-metadata">

**Author:** ![jordikt](https://community.folivora.ai/user_avatar/community.folivora.ai/jordikt/32/26021_2.png) [@jordikt](https://community.folivora.ai/u/jordikt)\
**Post date:** [September 19, 2023, 8:08pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/13 "2023-09-19T20:08:16Z")

</div>

> [@Andreas\_Hegenberg](#):
>
> I have experimented a bit, and I think the new option works pretty well (v4.270):

Perfect !!!!!

4.270 is my new favourite number!! 😀

Thanks a lot Andreas, you are the best!! ✌

---

<div class="post-metadata">

**Author:** ![jordikt](https://community.folivora.ai/user_avatar/community.folivora.ai/jordikt/32/26021_2.png) [@jordikt](https://community.folivora.ai/u/jordikt)\
**Post date:** [September 20, 2023, 7:19pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/14 "2023-09-20T19:19:48Z")

</div>

@Andreas_Hegenberg

I have configured the "Toggle Pin/Unpin focused window" with a red background to highlight the pinned windows.  
I am experiencing 2 issues with this background configuration.

**Issue 1** : When the pinned window get the focus after loose the focus, the background is not shown:

[/uploads/default/original/3X/b/7/b739a4d0527d18ea561ca9fc3f30ac8a50e5170b.mp4](https://community.folivora.ai/uploads/default/original/3X/b/7/b739a4d0527d18ea561ca9fc3f30ac8a50e5170b.mp4)

**Issue 2** : The background shows a white rectangle around the window. Is it possible to remove this rectangle or make it transparent? Detail of the square of the pinned window:

![Captura de pantalla 2023-09-20 a les 21.05.32](https://community.folivora.ai/uploads/default/original/3X/8/f/8f3f04c23bb402c74a2ae3e41599a121b7c173d0.png)

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [September 20, 2023, 7:52pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/15 "2023-09-20T19:52:40Z")

</div>

you probably set a margin in the action config, thus you see the red border. The corners can not easily be changed unfortunately, AFAIK it’s a limitation of the macOS ScreenCaptureKit, which can not capture transparent areas

//edit: I was wrong, it was something stupid I did

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [November 21, 2024, 4:08pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/16 "2024-11-21T16:08:20Z")

</div>

> [@jordikt](#):
>
> **Issue 2** : The background shows a white rectangle around the window. Is it possible to remove this rectangle or make it transparent? Detail of the square of the pinned window:

v4.886 improves this action a bit and should get rid of the color corners and the border by default! Also it should improve sharpness of text

---

<div class="post-metadata">

**Author:** ![Frank1](https://community.folivora.ai/letter_avatar_proxy/v4/letter/f/a87d85/32.png) [@Frank1](https://community.folivora.ai/u/Frank1)\
**Post date:** [November 21, 2024, 4:26pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/17 "2024-11-21T16:26:35Z")

</div>

Mm, unfortunately BTT v4.886 crashes every time I activate the PIN function. Everything was fine before.

 ![image](https://community.folivora.ai/uploads/default/original/3X/d/f/df5704bd8b3c771c1203bc7aab0d8634c224104a.png)

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [November 21, 2024, 4:29pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/18 "2024-11-21T16:29:24Z")

</div>

Could you post the crashlog? Maybe something on \< macos 15

---

<div class="post-metadata">

**Author:** ![Frank1](https://community.folivora.ai/letter_avatar_proxy/v4/letter/f/a87d85/32.png) [@Frank1](https://community.folivora.ai/u/Frank1)\
**Post date:** [November 21, 2024, 4:31pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/19 "2024-11-21T16:31:00Z")

</div>

// removed by andreas, got all what I needed

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [November 21, 2024, 4:31pm UTC](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313/20 "2024-11-21T16:31:16Z")

</div>

Ah I think I already saw it (issue on macOS 13). Should be fixed in v4.887, uploading now!

Btw. this preset might also be interesting to users of this action:  
[https://community.folivora.ai/t/unpin-button-for-pinned-floating-on-top-windows/40435/3](https://community.folivora.ai/t/unpin-button-for-pinned-floating-on-top-windows/40435/3)

[Next page](https://community.folivora.ai/t/toggle-pin-unpin-focused-window/33313.md?page=2)
