Make background of more controls transparent in wxOSX wxRadioBox, wxRadioButton and wxSlider should also have transparent background. Closes #26092.
Ensure that application is always shown after launch under macOS Post dummy event from applicationDidFinishLaunching, otherwise on some macOS versions apps might not boot properly if no other events are happening. Closes #26095. Closes #26098.
| ... | ... | @@ -73,6 +73,8 @@ public: |
| 73 | 73 | virtual wxString GetString(unsigned int item) const override;
|
| 74 | 74 | virtual void SetString(unsigned int item, const wxString& label) override;
|
| 75 | 75 | |
| 76 | + virtual bool HasTransparentBackground() override { return true; }
|
|
| 77 | + |
|
| 76 | 78 | // protect native font of box
|
| 77 | 79 | virtual bool SetFont( const wxFont &font ) override;
|
| 78 | 80 | // Other external functions
|
| ... | ... | @@ -37,6 +37,8 @@ public: |
| 37 | 37 | virtual void SetValue(bool val) override;
|
| 38 | 38 | virtual bool GetValue() const override;
|
| 39 | 39 | |
| 40 | + virtual bool HasTransparentBackground() override { return true; }
|
|
| 41 | + |
|
| 40 | 42 | // implementation
|
| 41 | 43 | |
| 42 | 44 | void Command(wxCommandEvent& event) override;
|
| ... | ... | @@ -68,6 +68,8 @@ public: |
| 68 | 68 | int GetThumbLength() const override;
|
| 69 | 69 | void SetTick(int tickPos) override;
|
| 70 | 70 | |
| 71 | + virtual bool HasTransparentBackground() override { return true; }
|
|
| 72 | + |
|
| 71 | 73 | void Command(wxCommandEvent& event) override;
|
| 72 | 74 | // osx specific event handling common for all osx-ports
|
| 73 | 75 |
| ... | ... | @@ -76,6 +76,19 @@ void wxBell() |
| 76 | 76 | - (void)applicationDidFinishLaunching:(NSNotification *)notification
|
| 77 | 77 | {
|
| 78 | 78 | wxUnusedVar(notification);
|
| 79 | + |
|
| 80 | + // we must make sure, that there still is an event on the event queue
|
|
| 81 | + // otherwise stopping the event queue will not advance, because quitting only
|
|
| 82 | + // gets processed AFTER the handling of the current event
|
|
| 83 | + // see https://developer.apple.com/documentation/appkit/nsapplication/stop(_:)?language=objc
|
|
| 84 | + NSEvent *event = [NSEvent otherEventWithType:NSApplicationDefined
|
|
| 85 | + location:NSMakePoint(0.0, 0.0)
|
|
| 86 | + modifierFlags:0
|
|
| 87 | + timestamp:0
|
|
| 88 | + windowNumber:0
|
|
| 89 | + context:nil
|
|
| 90 | + subtype:0 data1:0 data2:0];
|
|
| 91 | + [NSApp postEvent:event atStart:FALSE];
|
|
| 79 | 92 | [NSApp stop:nil];
|
| 80 | 93 | wxTheApp->OSXOnDidFinishLaunching();
|
| 81 | 94 |
—
View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help