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

Bug #1783162 reported by Phillip Deremer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ncurses (Ubuntu)
Invalid
Undecided
Unassigned

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();
}

summary: - mvwin doesn't work if window is window is created with zero
- coordinates.
+ mvwin doesn't work if window is created with zero coordinates.
Revision history for this message
Thomas Dickey (dickey-his) wrote :

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
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.