I ended up programming a windows-like window system for my opengl engine. Every window gets a new glViewport as well as a call to glOrtho to setup a plain 2d resolution with the size of the window.
For example: The window has 100x100 pixels.
I set up glViewport with the correct window size. Now I do a call to glOrtho, with parameters 0 for left, 0 for top and width and height for the remaining viewport planes.
Now, I end up creating some rectangles for the window-frames, but some lines simply draw over the others even if I specify their coordinates with 1 distance (which should be 1 Pixel - theoretically?).
Any ideas are appreciated!