ui: Fix floating-window implementation for Windows/Mac. We need floating-window defined in the hashtables, as well as adding it /in addition to/ the existing flags.

db4
Doug Coleman 2014-07-16 14:38:50 -05:00
parent b460563da3
commit fdcc33acee
5 changed files with 9 additions and 4 deletions

View File

@ -112,6 +112,8 @@ M: cocoa-ui-backend (set-fullscreen) ( world ? -- )
M: cocoa-ui-backend (fullscreen?) ( world -- ? )
handle>> view>> -> isInFullScreenMode zero? not ;
! XXX: Until someone tests OSX with a tiling window manager,
! floating-window is the same as normal-title-window
CONSTANT: window-control>styleMask
H{
{ close-button $ NSClosableWindowMask }
@ -119,8 +121,9 @@ CONSTANT: window-control>styleMask
{ maximize-button 0 }
{ resize-handles $ NSResizableWindowMask }
{ small-title-bar $[ NSTitledWindowMask NSUtilityWindowMask bitor ] }
{ normal-title-bar $ NSTitledWindowMask }
{ textured-background $ NSTexturedBackgroundWindowMask }
{ normal-title-bar $ NSTitledWindowMask }
{ floating-window $ NSTitledWindowMask }
}
: world>styleMask ( world -- n )

View File

@ -237,6 +237,7 @@ CONSTANT: window-control>style
{ resize-handles $ WS_THICKFRAME }
{ small-title-bar $ WS_CAPTION }
{ normal-title-bar $ WS_CAPTION }
{ floating-window 0 }
}
CONSTANT: window-control>ex-style
@ -248,6 +249,7 @@ CONSTANT: window-control>ex-style
{ resize-handles $ WS_EX_WINDOWEDGE }
{ small-title-bar $[ WS_EX_TOOLWINDOW WS_EX_TOPMOST bitor ] }
{ normal-title-bar $ WS_EX_APPWINDOW }
{ floating-window 0 }
}
: needs-sysmenu? ( controls -- ? )

View File

@ -92,7 +92,7 @@ M: browser-gadget focusable-child* search-field>> ;
<browser-gadget>
<world-attributes>
"Browser" >>title
{ floating-window } >>window-controls
[ { floating-window } append ] change-window-controls
open-status-window ;
: browser-window ( -- )

View File

@ -115,6 +115,6 @@ deploy-gadget "toolbar" f {
[
<world-attributes>
swap "Deploying “" "”" surround >>title
{ floating-window } >>window-controls
[ { floating-window } append ] change-window-controls
] bi
open-window ;

View File

@ -105,7 +105,7 @@ M: inspector-gadget focusable-child*
[
<world-attributes>
swap "Slot editor: " prepend >>title
{ floating-window } >>window-controls
[ { floating-window } append ] change-window-controls
] bi*
open-status-window ;