gabrielbull / react-desktop

React UI Components for macOS High Sierra and Windows 10
http://reactdesktop.js.org
MIT License
9.51k stars 461 forks source link

Allow end-user to force `isWindowFocused` prop #126

Closed davej closed 6 years ago

davej commented 6 years ago

This change allows the TitleBar component to forced into the focused or unfocused state. It already works for the Window component so no change was needed. I need this functionality for my app. If the prop isn't manually specified then existing behaviour will remain the same (i.e. focus will change depending on window focus).

Usage:

<Window
  chrome={true}
  height="600px"
  width="800px"
  padding="0"
  isWindowFocused={true}
>
  <TitleBar
    title="Lorem Ipsum"
    controls={true}
    isWindowFocused={true}
  />
</Window>