Mercurial > mplayer.hg
comparison gui/wm/ws.c @ 33993:57d711d3dcca
Change parameter b of wsMoveWindow().
Make it Bool, rename it abs and reverse its meaning. The parameter now
indicates whether x and y shall be handled as real, absolute position
values or as possibly mock ones.
author | ib |
---|---|
date | Thu, 08 Sep 2011 11:11:02 +0000 |
parents | 4dda3e85b298 |
children | 8e5680eccf54 |
comparison
equal
deleted
inserted
replaced
33992:4dda3e85b298 | 33993:57d711d3dcca |
---|---|
1040 } | 1040 } |
1041 | 1041 |
1042 // ---------------------------------------------------------------------------------------------- | 1042 // ---------------------------------------------------------------------------------------------- |
1043 // Move window to x, y. | 1043 // Move window to x, y. |
1044 // ---------------------------------------------------------------------------------------------- | 1044 // ---------------------------------------------------------------------------------------------- |
1045 void wsMoveWindow(wsTWindow *win, int b, int x, int y) | 1045 void wsMoveWindow(wsTWindow *win, Bool abs, int x, int y) |
1046 { | 1046 { |
1047 if (b) { | 1047 if (abs) { |
1048 win->X = x; | |
1049 win->Y = y; | |
1050 } else { | |
1048 switch (x) { | 1051 switch (x) { |
1049 case -1: | 1052 case -1: |
1050 win->X = (wsMaxX / 2) - (win->Width / 2) + wsOrgX; | 1053 win->X = (wsMaxX / 2) - (win->Width / 2) + wsOrgX; |
1051 break; | 1054 break; |
1052 | 1055 |
1070 | 1073 |
1071 default: | 1074 default: |
1072 win->Y = y; | 1075 win->Y = y; |
1073 break; | 1076 break; |
1074 } | 1077 } |
1075 } else { | |
1076 win->X = x; | |
1077 win->Y = y; | |
1078 } | 1078 } |
1079 | 1079 |
1080 win->SizeHint.flags = PPosition | PWinGravity; | 1080 win->SizeHint.flags = PPosition | PWinGravity; |
1081 win->SizeHint.x = win->X; | 1081 win->SizeHint.x = win->X; |
1082 win->SizeHint.y = win->Y; | 1082 win->SizeHint.y = win->Y; |