throw an error for out of bounds window levels
This commit is contained in:
parent
fb741285c6
commit
1f5518b91e
6 changed files with 20 additions and 8 deletions
|
@ -513,9 +513,16 @@ bool Window::IsClosable() {
|
|||
void Window::SetAlwaysOnTop(bool top, mate::Arguments* args) {
|
||||
std::string level = "floating";
|
||||
int relativeLevel = 0;
|
||||
std::string error;
|
||||
|
||||
args->GetNext(&level);
|
||||
args->GetNext(&relativeLevel);
|
||||
window_->SetAlwaysOnTop(top, level, relativeLevel);
|
||||
|
||||
window_->SetAlwaysOnTop(top, level, relativeLevel, &error);
|
||||
|
||||
if (!error.empty()) {
|
||||
args->ThrowError(error);
|
||||
}
|
||||
}
|
||||
|
||||
bool Window::IsAlwaysOnTop() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue