ui.backend.gtk: set the active? to 100 in on-map, should fix #1506
what now happens is that configure events are skipped until the first on-map signal is fired. seem to work fine in a variety of wm:s. if this works well we can return active? to be plain boolean.db4
parent
f730f81c0e
commit
5deea76d55
|
@ -13,4 +13,4 @@ HELP: on-configure
|
|||
{ "user-data" alien }
|
||||
{ "?" boolean }
|
||||
}
|
||||
{ $description "Handles a configure event (" { $link GdkEventConfigure } " sent from the windowing system. The world is activated if it isn't already and a map event has been received. Then it is relayouted." } ;
|
||||
{ $description "Handles a configure event (" { $link GdkEventConfigure } " sent from the windowing system. If the world has been sent the on-map event from gtk then it is relayouted, otherwise nothing happens." } ;
|
||||
|
|
|
@ -257,18 +257,18 @@ CONSTANT: action-key-codes
|
|||
2drop window relayout t ;
|
||||
|
||||
: on-configure ( win event user-data -- ? )
|
||||
drop swap window dup active?>> 50 >= [
|
||||
100 >>active? swap GdkEventConfigure memory>struct
|
||||
drop swap window dup active?>> 100 = [
|
||||
swap GdkEventConfigure memory>struct
|
||||
[ event-loc >>window-loc ] [ event-dim >>dim ] bi
|
||||
relayout-1
|
||||
] [ 2drop ] if f ;
|
||||
|
||||
: on-map ( win event user-data -- ? )
|
||||
2drop window 100 >>active? drop t ;
|
||||
|
||||
: on-delete ( win event user-data -- ? )
|
||||
2drop window ungraft t ;
|
||||
|
||||
: on-map ( win event user-data -- ? )
|
||||
2drop window 50 >>active? drop t ;
|
||||
|
||||
:: connect-win-state-signals ( win -- )
|
||||
win "expose-event" [ on-expose yield ]
|
||||
GtkWidget:expose-event connect-signal
|
||||
|
|
Loading…
Reference in New Issue