kbin account: e0qdk@kbin.social

This is my Lemmy alt. I’m about 50/50 between kbin and reddthat these days, but my kbin account is more established. If you’re looking for my older posts, check there.

Interests: programming, video games, anime, music composition

  • 0 Posts
  • 5 Comments
Joined 7 months ago
cake
Cake day: November 27th, 2023

help-circle
  • Everything I’ve set in Settings is forgotten: Default Listing reverts to All, Default Post Sort reverts to Hot, and so on.

    mlmym (the “old” interface) stores its front-end specific settings in your browser via cookies and local storage. The way it’s implemented works for the most part and probably makes the front-end simpler, but has some downsides like not retaining your choices between logins. There’s an issue open for this in the bug tracker: https://github.com/rystaf/mlmym/issues/104

    I’m not sure why it forces a logout periodically even when you’re using it regularly though. (I mean, the cookies are probably not being updated and just expire eventually – but I don’t know if that was a deliberate choice or not.) It might be a good idea to open an issue for this?




  • On a past OpenGL project where I supported resizing, I used GLFW and responded to its framebuffer size callback by calling glViewport and resetting the projection matrix (in my case with glLoadIdentity followed by glOrtho – it’s not fresh in my memory any more, but I don’t think that project used shaders at all). I also called glClear with GL_COLOR_BUFFER_BIT as part of my regular redraw. That worked fine for my needs.

    It looks like what GLFW was doing under the hood to trigger that callback was looking for an XEvent from X11 (via XNextEvent in a loop with a condition based on the result of calling XQLength) with type set to ConfigureNotify and which had an xconfigure entry with a width or height that differed from what was tracked directly by GLFW on its own window structure. When it saw an event like that, it would call the callback. After processing the event queue, GLFW called XFlush on the display.

    See x11_window.c in GLFW’s source code for more detail: https://github.com/glfw/glfw/blob/master/src/x11_window.c

    Direct link to raw code, if you prefer: https://raw.githubusercontent.com/glfw/glfw/master/src/x11_window.c

    Hopefully comparing with what GLFW did can help you debug your own implementation. Good luck!