WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 211178
[GTK4] Make popup menus work
https://bugs.webkit.org/show_bug.cgi?id=211178
Summary
[GTK4] Make popup menus work
Adrian Perez
Reported
2020-04-29 05:12:32 PDT
Currently for popups menus windows of type GTK_WINDOW_POPUP are used, but this is not possible with GTK4 anymore. The way to create a popup window is using GtkPopover. If we want to mimic GTK combo boxes, we likely would need to reimplement parts of GtkTreePopover, which is the internal widget used as the popup part of combo boxes. On the other hand, we may be able to put the widget currently used inside a GtkPopover instead of inside the popup GtkWindow, apply the same CSS classes that GtkComboBox uses, and maybe that would be already good. Note that ideally we want to use the same code for both GTK3 and GTK4, as it was done recently for context menus in
bug #170553
:)
Attachments
Patch
(18.28 KB, patch)
2020-06-02 05:24 PDT
,
Carlos Garcia Campos
aperez
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2020-06-02 05:24:21 PDT
Created
attachment 400806
[details]
Patch
Adrian Perez
Comment 2
2020-06-02 05:42:16 PDT
Comment on
attachment 400806
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=400806&action=review
> Source/WebKit/UIProcess/gtk/WebPopupMenuProxyGtk.cpp:335 > + GdkRectangle windowRect = { rect.x(), rect.y(), rect.width(), rect.height() };
This exact same line is repeated below, so I would take it out of the “#if USE(GTK4)” guard.
Carlos Garcia Campos
Comment 3
2020-06-02 05:50:49 PDT
(In reply to Adrian Perez from
comment #2
)
> Comment on
attachment 400806
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=400806&action=review
> > > Source/WebKit/UIProcess/gtk/WebPopupMenuProxyGtk.cpp:335 > > + GdkRectangle windowRect = { rect.x(), rect.y(), rect.width(), rect.height() }; > > This exact same line is repeated below, so I would take it out of > the “#if USE(GTK4)” guard.
Yes, but inside a GTK_CHECK_VERSION(3, 24, 0) if
Adrian Perez
Comment 4
2020-06-02 06:04:46 PDT
(In reply to Carlos Garcia Campos from
comment #3
)
> (In reply to Adrian Perez from
comment #2
) > > Comment on
attachment 400806
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=400806&action=review
> > > > > Source/WebKit/UIProcess/gtk/WebPopupMenuProxyGtk.cpp:335 > > > + GdkRectangle windowRect = { rect.x(), rect.y(), rect.width(), rect.height() }; > > > > This exact same line is repeated below, so I would take it out of > > the “#if USE(GTK4)” guard. > > Yes, but inside a GTK_CHECK_VERSION(3, 24, 0) if
You are right, all good then!
Carlos Garcia Campos
Comment 5
2020-06-02 06:05:02 PDT
Committed
r262414
: <
https://trac.webkit.org/changeset/262414
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug