-
-
Notifications
You must be signed in to change notification settings - Fork 44
Description
First a few words of happy amazement :) I created some Nim bindings for libagar and it works like a charm!!! Love the simple straight forward interface. It's so cool when you only need a very thin layer to use a C library in a high-level language. Now for the issue.
I noticed an edge-case issue, menu and dialog are positioned incorrectly using the i3 tiling window manager with the glx backend. Windows are in the top left and the width is fullscreen.
Example program
#include <agar/core.h>
#include <agar/gui.h>
void MyHandlerFn(AG_Event *event)
{
AG_TextMsg(AG_MSG_INFO, "Hello, %s!", AG_STRING(1));
}
int main(int argc, char *argv)
{
AG_Window *win;
AG_InitCore(NULL, 0);
AG_InitGraphics(0);
win = AG_WindowNew(0);
AG_LabelNew(win, 0, "Hello, world!");
AG_ButtonNewFn(win, 0, "Hello", MyHandlerFn, "%s", "world");
AG_WindowShow(win);
AG_EventLoop();
return (0);
}I suspect this is because a tiled window might not have the same sort of position information set as a floating window, which might result in libagar passing some kind of default position when creating the window for the dialog.
The example program works fine in OpenBox. I also noticed that the menu and dialog windows do not appear in the wmctrl -l list in i3, while they do appear there in OpenBox.
I have been unable so far to figure out where the relevant parts might be in the glx driver and window creation code. Any help much appreciated, and thanks again for making libagar!
