mvwin doesn't work if window is created with zero coordinates.
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(
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(
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. |
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.