Giter Site home page Giter Site logo

Comments (11)

aolo2 avatar aolo2 commented on August 17, 2024

Hmm, it seems this only happens if another window is already open. If gf is the only window, is draws instantly. Some x11 event related probably?

from gf.

aolo2 avatar aolo2 commented on August 17, 2024

It's almost certainly ConfigureNotify.

from gf.

nakst avatar nakst commented on August 17, 2024

What window manager are you using?

from gf.

aolo2 avatar aolo2 commented on August 17, 2024

I'm on Openbox 3.6.1

from gf.

nakst avatar nakst commented on August 17, 2024

I tried running gf on Openbox 3.6.1, and the window drew correctly without having to resize it -- have you changed any configuration settings that might affect this? I am not familiar with X11 programming; is there no guarantee the ConfigureNotify message will be sent after creating a window? I'd rather not have to add a workaround if it isn't necessary.

from gf.

aolo2 avatar aolo2 commented on August 17, 2024

It appears ConfigureNotify is not guaranteed to be sent on window creation:
https://tronche.com/gui/x/xlib/events/window-state-change/configure.html

Out of the functions listed, my guess would be that calling XRaiseWindow is the most logical choice.

from gf.

nakst avatar nakst commented on August 17, 2024

A window is mapped and its position in the stacking order is changed by calling XMapRaised().

XMapRaised is called here https://github.com/nakst/gf/blob/master/luigi.h#L3961 on the main window. Surely this should generate the ConfigureNotify event?

from gf.

nakst avatar nakst commented on August 17, 2024

Could you try adding

XResizeWindow(ui.display, window->window, width + 1, height + 1);

after the call to XMapRaised and see if makes a difference?

from gf.

aolo2 avatar aolo2 commented on August 17, 2024

It does work (even without the + 1)

from gf.

aolo2 avatar aolo2 commented on August 17, 2024

It is related to me having window decorations disabled. I tried enabling them back, and then ConfigureNotify arrives. An openbox bug maybe? I'll contact the devs.

If the xlib docs say that XMapRaised should generate the ConfigureNotify event, then it's probably them who should fix it, not you.

from gf.

aolo2 avatar aolo2 commented on August 17, 2024

This got fixed, by the way. I have no idea where or how, though..

from gf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.