# Odd resizing issue present across all plugins created with iPlug2

**URL:** <https://iplug2.discourse.group/t/odd-resizing-issue-present-across-all-plugins-created-with-iplug2/664>\
**Category:** Windows\
**Created:** [9 July 2022 20:45 UTC](https://iplug2.discourse.group/t/odd-resizing-issue-present-across-all-plugins-created-with-iplug2/664 "2022-07-09T20:45:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![snfk](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/snfk/32/140_2.png) [@snfk](https://iplug2.discourse.group/u/snfk)\
**Post date:** [9 July 2022 20:45 UTC](https://iplug2.discourse.group/t/odd-resizing-issue-present-across-all-plugins-created-with-iplug2/664/1 "2022-07-09T20:45:36Z")

</div>

I am using SKIA graphics and the CPU. In FL Studio, the plugin lags and resizes itself upon opening the UI. I am using the same graphics settings as AnalogObsession and I haven’t noticed any issues with his stuff. I know that this isn’t a lot to work off of, I’m not sure if there is some obvious solution that I haven’t seen yet. I can get a video if needed. Thanks!

---

<div class="post-metadata">

**Author:** ![RexMartin2](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@RexMartin2](https://iplug2.discourse.group/u/RexMartin2)\
**Post date:** [10 July 2022 15:23 UTC](https://iplug2.discourse.group/t/odd-resizing-issue-present-across-all-plugins-created-with-iplug2/664/2 "2022-07-10T15:23:38Z")

</div>

I have also had issues with FL Studio: [https://iplug2.discourse.group/t/lots-of-posts-on-this-forum-about-issues-with-fl-studio/488](https://iplug2.discourse.group/t/lots-of-posts-on-this-forum-about-issues-with-fl-studio/488)

I know you’re reporting a graphics issue but it also seems the VST “specs” in general are loosely followed by some DAWs (FL, Ardour, etc). How else do we explain plugins that work perfectly everywhere else _except_ DAW “X”?

Unfortunately, that’s where the need for “if (GetHost() == such and such)” comes in. Some plugin manufacturers (like Fabfilter) must have a ton of such conditional coding because their plugins seem to work everywhere.

---

<div class="post-metadata">

**Author:** ![snfk](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/snfk/32/140_2.png) [@snfk](https://iplug2.discourse.group/u/snfk)\
**Post date:** [17 July 2022 13:10 UTC](https://iplug2.discourse.group/t/odd-resizing-issue-present-across-all-plugins-created-with-iplug2/664/3 "2022-07-17T13:10:51Z")

</div>

I ran it as a standalone plugin and it did the same thing. It’s probably something on my end, I just wanted to make sure this wasn’t a known issue with an easy fix I wasn’t seeing.

Edit: Changing this (`IGraphicsWin.cpp`):

```auto
if (!GetCapture()) // workaround Windows issues with window sizing during mouse move
  {
    float scale = GetScaleForHWND(mPlugWnd);
    if (scale != GetScreenScale())
      SetScreenScale(scale);
  }

```

to this:

```auto
  if (!GetCapture()) // workaround Windows issues with window sizing during mouse move
  {
    //float scale = GetScaleForHWND(mPlugWnd);
    //if (scale != GetScreenScale())
    // SetScreenScale(scale);
  }

```

works. I don’t know why except that it isn’t resizing the screen in the event loop.

---

<div class="post-metadata">

**Author:** ![snfk](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/snfk/32/140_2.png) [@snfk](https://iplug2.discourse.group/u/snfk)\
**Post date:** [16 August 2022 18:31 UTC](https://iplug2.discourse.group/t/odd-resizing-issue-present-across-all-plugins-created-with-iplug2/664/4 "2022-08-16T18:31:39Z")

</div>

> <https://github.com/iPlug2/iPlug2/blob/9bb2f1cf59808b96dcb30eaa0840c7761bf9e469/IGraphics/Platforms/IGraphicsWin.cpp#L247-L252>

Just found that this code is also seriously lagging the window on my laptop screen. It works fine on my external monitor however. Dragging around the window on my laptop screen causes the window to slowly respond to my cursor moving it.

If I remove this code, resizing does not seem to be an option. @olilarkin any ideas on how to fix this?

I should add that I am using Skia on the CPU. Running using OpenGL2 does not lag, but is sometimes unstable (and I would like to stick to CPU rendering). Thanks!

---

<div class="post-metadata">

**Author:** ![RexMartin2](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@RexMartin2](https://iplug2.discourse.group/u/RexMartin2)\
**Post date:** [18 August 2022 16:47 UTC](https://iplug2.discourse.group/t/odd-resizing-issue-present-across-all-plugins-created-with-iplug2/664/5 "2022-08-18T16:47:26Z")

</div>

Just my experience - I found CPU rendering very slow on my Intel i5 desktop and stopped using it the first time I tried it. I have been using NanoVG and OpenGL2 for everything (both Mac and PC) and have not had any UI issues reported with either old machines or new, including M1. YMMV
