# Frameless Window Design with Secondary Monitor Flickering and Performance Degradation

**URL:** <https://discourse.slicer.org/t/frameless-window-design-with-secondary-monitor-flickering-and-performance-degradation/40436>\
**Category:** Development\
**Created:** [November 29, 2024, 9:03am UTC](https://discourse.slicer.org/t/frameless-window-design-with-secondary-monitor-flickering-and-performance-degradation/40436 "2024-11-29T09:03:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![park](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/park/32/5717_2.png) [@park](https://discourse.slicer.org/u/park)\
**Post date:** [November 29, 2024, 9:03am UTC](https://discourse.slicer.org/t/frameless-window-design-with-secondary-monitor-flickering-and-performance-degradation/40436/1 "2024-11-29T09:03:28Z")

</div>

Hi all!

I am currently working on implementing a frameless window design for my application and rebuilding the functionalities provided by the native frame. The primary reasons for this approach are:

- To ensure consistent window design across operating systems.
- To maximize the available size of the MainWindow.

Below is the code snippet I am using for this purpose:

```auto
mainWindow = slicer.util.mainWindow()
flags = mainWindow.windowFlags()
newFlags = (flags | qt.Qt.FramelessWindowHint | qt.Qt.WindowStaysOnTopHint)
mainWindow.setWindowFlags(newFlags)
mainWindow.hide()
mainWindow.show()

```

This implementation works as expected on the primary monitor. However, when the application is moved to a secondary monitor, I encounter two issues:

- Noticeable flickering of the window.
- Significant performance degradation.

I would appreciate any insights into the potential cause of these issues or suggestions for resolving them.

Thank you in advance for your help!
