GUI window movement

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Kamal123
Member
Member
Posts: 99
Joined: Fri Nov 01, 2019 1:17 am

GUI window movement

Post 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?
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: GUI window movement

Post 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.
User avatar
bloodline
Member
Member
Posts: 264
Joined: Tue Sep 15, 2020 8:07 am
Location: London, UK

Re: GUI window movement

Post 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.
CuriOS: A single address space GUI based operating system built upon a fairly pure Microkernel/Nanokernel. Download latest bootable x86 Disk Image: https://github.com/h5n1xp/CuriOS/blob/main/disk.img.zip
Discord:https://discord.gg/zn2vV2Su
thewrongchristian
Member
Member
Posts: 426
Joined: Tue Apr 03, 2018 2:44 am

Re: GUI window movement

Post 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.
Kamal123
Member
Member
Posts: 99
Joined: Fri Nov 01, 2019 1:17 am

Re: GUI window movement

Post 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
Post Reply