Not logged inOpenClonk Forum
- - By Günther [de] Date 2012-04-12 19:10 Edited 2012-04-12 19:46
So I'd like to make the GTK+ developer mode usable on other operating systems. The first step was to separate the "Are we running on Windows?" and "Are we using the Win32 API to create Windows and stuff?" questions and make the SDL port work with Wine. That was easier than expected and is now in the repository, but the SDL port doesn't have an editor, so is mostly useful for ports to new operating systems. The second step is to make the Linux port use GTK+ instead of XLib. The current result is on bitbucket. I've run into two problems, though:
- The GTK+ input methods seem to be mostly undocumented and/or not available without a gtk widget. So the compose key stops working.
- I can't seem to make the fullscreen window or the drawing area in it receive focus-out events. That means that switching to a different window won't change the screen resolution back.

These aren't really showstoppers - nowadays everybody should use the resolution of their flat screen anyway, and an input method without visual feedback is mostly useless anyway - but I wanted to ask for help first anyway.

I haven't even begun to do research for the third step, making the OpenGL context creation for GTK+ windows work on other OSes.
Reply
Parent - - By Clonk-Karl [de] Date 2012-04-13 23:47
So I tried out your branch from bitbucket and focus-out events work just fine. When I tab out from fullscreen mode or switch workspaces the desktop resolution is properly restored. What I see is that sometimes after tabbing in again a small part of the window is not being rendered to (probably the drawing area size does not match the window size)? See the screenshot attached.

In an unrelated note, I don't think it makes sense for Clonk to use GTK+ anywhere else than on Linux.
Attachment: Screenshotat2012-04-14003845.png - Not fully covered fullscreen window (447k)
Reply
Parent - By Günther [de] Date 2012-04-14 02:27
Strange. Oh well, maybe someone else will be able to reproduce the problem, and if not I'll just stick to using the full resolution.

I'll look into the drawing area and push to hg.openclonk.org after that.

And the GTK+ developer mode has more features than the other ones, so I'd like to at least make them available. If there are too many problems we can always just continue to use the platform-specific code.
Reply
Parent - By Clonk-Karl [de] Date 2012-04-14 16:04
Two more notes:

In GTK3, the fullscreen window should not have a resize grip, it can be disabled with gtk_window_set_has_resize_grip().

When tabbing out in fullscreen mode, the window should iconify itself, otherwise there is a "ghost" window laying around in your desktop which doesn't draw anything (since the engine only draws itself when it has focus) but when you click it to make it have focus it is fullscreened again anyway.
Reply

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill