Page 1 of 1

GUI window movement

Posted: Tue Sep 21, 2021 6:25 am
by Kamal123
Hi, I have been working on a compositing window manager for my kernel. The problem I am facing is with windows movements. If I move the window to right side or left side of the screen such that half of the window moves out of the visible screen, the half part automatically appears from left or from right side of the screen. For example, if I move window to left of the screen, the half part that left outside the screen will appear from right side of the screen. Why is that happening? How to fix that?

Re: GUI window movement

Posted: Tue Sep 21, 2021 6:55 am
by iansjack
It seems that instead of treating the right-hand part of the window as outside the viewport you are merely moving it to a higher position in video RAM.

Re: GUI window movement

Posted: Wed Sep 22, 2021 7:59 am
by bloodline
Kamal123 wrote:Hi, I have been working on a compositing window manager for my kernel. The problem I am facing is with windows movements. If I move the window to right side or left side of the screen such that half of the window moves out of the visible screen, the half part automatically appears from left or from right side of the screen. For example, if I move window to left of the screen, the half part that left outside the screen will appear from right side of the screen. Why is that happening? How to fix that?
Your graphics routines need to clip to the bounds of the display.

Re: GUI window movement

Posted: Thu Sep 23, 2021 2:58 am
by thewrongchristian
Kamal123 wrote:Hi, I have been working on a compositing window manager for my kernel. The problem I am facing is with windows movements. If I move the window to right side or left side of the screen such that half of the window moves out of the visible screen, the half part automatically appears from left or from right side of the screen. For example, if I move window to left of the screen, the half part that left outside the screen will appear from right side of the screen. Why is that happening? How to fix that?
Try this:

https://github.com/JMarlin/wsbe

Not looked at it myself in detail, but I found it via this forum, and will explain the basics of clipping.

Re: GUI window movement

Posted: Thu Sep 23, 2021 10:59 am
by Kamal123
Thank you everyone.. I have implemented clipping system.. now windows movements are limited to screen visible portions.

Do follow & fork my project
https://github.com/manaskamal/aurora-xeneva