# Help with setting window size

**URL:** https://discourse.processing.org/t/help-with-setting-window-size/39469
**Category:** Processing
**Created:** [October 28, 2022, 9:46am UTC](https://discourse.processing.org/t/help-with-setting-window-size/39469 "2022-10-28T09:46:32Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![DeeDee](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@DeeDee](https://discourse.processing.org/u/DeeDee)
#### Post date: [October 28, 2022, 9:46am UTC](https://discourse.processing.org/t/help-with-setting-window-size/39469/1 "2022-10-28T09:46:32Z")

</div>

Hello

Can anyone help - this code works on a mac but on windows it displays the window as fukkscreen i.e. it does not do the divided by 2. Why?

```auto
void settings()
{
  // This command sets the size of the sketch window.
  size(displayWidth / 2, displayHeight);
}

```

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [October 30, 2022, 11:40am UTC](https://discourse.processing.org/t/help-with-setting-window-size/39469/2 "2022-10-30T11:40:42Z")

</div>

Hello @DeeDee,

It works correctly for me with W10 and Processing 4.01.

```auto
void settings()
  {
  // This command sets the size of the sketch window.
  println(displayWidth, displayHeight);
  println(displayWidth/2, displayHeight);
  size(displayWidth/2, displayHeight);
  }

```

`:)`
