[Bug 1783162] Re: mvwin doesn't work if window is created with zero coordinates.

Thomas Dickey dickey at his.com
Mon Jul 23 20:41:08 UTC 2018


It's in the manual page: the zero-coordinates produce a window as large
as the screen, and mvwin will not move it off the screen.

** Changed in: ncurses (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ncurses in Ubuntu.
https://bugs.launchpad.net/bugs/1783162

Title:
  mvwin doesn't work if window is created with zero coordinates.

Status in ncurses package in Ubuntu:
  Invalid

Bug description:
  Using the following code I cant move the window with mvwin
  ============================================================
  #include <ncurses.h>
  #include <stdlib.h>

  void quit();

  int main(int argc, char** argv) {
    initscr();
    atexit(quit);
    curs_set(0);
    noecho();

    WINDOW *win = newwin(0,0,0,0); // <-- Defference
    mvwin(win,10,10);
    wresize(win,10,10);

    refresh();
    box(win,0,0);
    wrefresh(win);
    getch();

    return 0;
  }

  void quit() {
    endwin();
  }
  ============================================================

  
  Changing the window start coordinates to 1,1 and it works.
  ============================================================
  #include <ncurses.h>
  #include <stdlib.h>

  void quit();

  int main(int argc, char** argv) {
    initscr();
    atexit(quit);
    curs_set(0);
    noecho();

    WINDOW *win = newwin(1,1,0,0); // <-- Defference
    mvwin(win,10,10);
    wresize(win,10,10);

    refresh();
    box(win,0,0);
    wrefresh(win);
    getch();

    return 0;
  }

  void quit() {
    endwin();
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ncurses/+bug/1783162/+subscriptions



More information about the foundations-bugs mailing list