rtheunissen
rtheunissen

Reputation: 7435

How can I listen for when the screen insets change?

I'm developing an application that sets its size to fit the screen's bounds (taking into account the screen's insets). However if the insets change, for example when I auto-hide my taskbar when the application is already visible, the size of the window remains the same. Is it possible to listen for when those insets might change?

Upvotes: 1

Views: 72

Answers (1)

ControlAltDel
ControlAltDel

Reputation: 35011

Well, for the taskbar to be hidden, your application must lose focus, right? So you could use a WindowFocusListener and just get the screen insets again on focus gained.

Upvotes: 2

Related Questions