Skip to content

Commit 488ff17

Browse files
committed
[win][skip-ci] Prevent hiding the titlebar
Prevent hiding the titlebar when setting the window position at [0,0]
1 parent 32af1ac commit 488ff17

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

graf2d/win32gdk/src/TGWin32.cxx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2110,6 +2110,10 @@ void TGWin32::MoveWindow(Int_t wid, Int_t x, Int_t y)
21102110
gTws = fWindows[wid].get();
21112111
if (!gTws->open) return;
21122112

2113+
// prevent hiding the titlebar
2114+
if (x == 0 && y == 0) {
2115+
x = 1; y = 1;
2116+
}
21132117
gdk_window_move((GdkDrawable *) gTws->window, x, y);
21142118
}
21152119

@@ -4809,6 +4813,10 @@ void TGWin32::MoveWindow(Window_t id, Int_t x, Int_t y)
48094813
{
48104814
if (!id) return;
48114815

4816+
// prevent hiding the titlebar
4817+
if (x == 0 && y == 0) {
4818+
x = 1; y = 1;
4819+
}
48124820
gdk_window_move((GdkDrawable *) id, x, y);
48134821
}
48144822

@@ -4820,6 +4828,10 @@ void TGWin32::MoveResizeWindow(Window_t id, Int_t x, Int_t y, UInt_t w,
48204828
{
48214829
if (!id) return;
48224830

4831+
// prevent hiding the titlebar
4832+
if (x == 0 && y == 0) {
4833+
x = 1; y = 1;
4834+
}
48234835
gdk_window_move_resize((GdkWindow *) id, x, y, w, h);
48244836
}
48254837

@@ -6668,6 +6680,10 @@ void TGWin32::SetWMPosition(Window_t id, Int_t x, Int_t y)
66686680
{
66696681
if (!id) return;
66706682

6683+
// prevent hiding the titlebar
6684+
if (x == 0 && y == 0) {
6685+
x = 1; y = 1;
6686+
}
66716687
gdk_window_move((GdkDrawable *) id, x, y);
66726688
}
66736689

0 commit comments

Comments
 (0)