Git Product home page Git Product logo

Comments (4)

wmcbrine avatar wmcbrine commented on June 3, 2024

PDC_PRESERVE_SCREEN is about preserving the content of the original terminal window, from before PDCurses starts rendering. In the case of SDL, as well as X, PDCurses creates a new window, so this option has no meaning. The omission is intentional.

I don't understand what you're talking about with flickering.

from pdcurses.

bjadamson avatar bjadamson commented on June 3, 2024

Not having it causes my SDL window to flicker when I shutdown/init pdcurses during a resize. This is the best way I have found to support smooth resizing using pdcurses, calling delwin/initscr to update pdcurses about the new screen size. Calling resize_term isn't an option because it returns ERR because I have pdc_ownwindow = false.

PDC_PRESERVE_SCREEN is about preserving the content of the original terminal window, from before PDCurses starts rendering.

I get that's the intent, but I'm having to insert a SP->_preserve = true into the source code of pdcurses so I don't get the flickering during initscr. Unless you have any other ideas, I brought this issue up so I could call delwin/initscr during a resize event and not get a bunch of screen flickering due to the clear/refresh calls caused by calling initscr.

from pdcurses.

Bill-Gray avatar Bill-Gray commented on June 3, 2024

Just guessing here, but... if you remove the lines

if( !pdc_own_window)
    return ERR;

from PDC_resize_screen() (i.e., tell PDCurses : "Go ahead and resize this window, even though it's not one PDCurses made"), do you get the desired effect (lack of flicker)? It seems as if it ought to work. I can see why using the SP->_preserve flag would also work, but it seems kludgey.

from pdcurses.

bjadamson avatar bjadamson commented on June 3, 2024

Closing as no longer an issue, I revamped my resize so I don't remember this anymore and the arguments from @Bill-Gray encourage me to close this.

from pdcurses.

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.