Re: Review of wip/carlosg/event-delivery
Hey, On Tue, May 16, 2017 at 8:24 PM, Matthias Clasenwrote: > On Tue, May 16, 2017 at 1:25 PM, Carlos Garnacho wrote: >> >> >> > - interactive overlay: buttons over entry get prelights and clicks >> > instead of the entry stealing them >> >> Hmm, the demo however sets the overlay as passthrough? >> https://git.gnome.org/browse/gtk+/tree/demos/gtk-demo/overlay.c#n60 > > > There's two overlay. One is passthrough, the other isn't: the "Numbers" are > supposed to be passthrough, while the entry is supposed to get input. Not what I see in code :). AFAICS both the entry and the label are children of a vbox, which is the only, pass-through overlay. The inspector seems to confirm this hierarchy. And this means gtk3 is broken :/, as it's essentially the same thing there. Cheers, Carlos ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Review of wip/carlosg/event-delivery
On Tue, May 16, 2017 at 1:25 PM, Carlos Garnachowrote: > > > - interactive overlay: buttons over entry get prelights and clicks > > instead of the entry stealing them > > Hmm, the demo however sets the overlay as passthrough? > https://git.gnome.org/browse/gtk+/tree/demos/gtk-demo/overlay.c#n60 > There's two overlay. One is passthrough, the other isn't: the "Numbers" are supposed to be passthrough, while the entry is supposed to get input. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Review of wip/carlosg/event-delivery
Hi Alex, Thanks for the review! On Tue, May 16, 2017 at 12:54 PM, Alexander Larssonwrote: > I took a quick look at the wip/carlosg/event-delivery branch. > > Here are some things in the tests that seems broken from interactive > testing: > > testgtk > - click on close button gives: > Gtk-CRITICAL **: _gtk_widget_captured_event: assertion > 'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed >This also happens in many other cases > - button box: > Click on button, hold down, mouse to other button => it > prelights. Should not have gotten enter notify due to implicit > grab. > - eventbox: > above child is not working > - expander: > Press on expander, mouse outside window, release, now the > expander expands when you enter the window > - panes: > Resizing the pane doesn't work > - spinbutton: > clicking on the buttons in the spinbutton shows really weird > prelight behaviour > - spinbutton: > Can't hold down button on spinbutton button to step > - test scroll: > Can't keep scrolling when cursor is outside toplevel (implicit > grab not working) Some of those (the warning, panes not working yet) were already on my list. The implicit grab issue is a nice gotcha... > > gtk4-demo: > - After startup, if I click on last row ("Menus") it doesn't properly > repaint the selected row Besides getting some i/o chld windows out of the way, I'm not sure how could the stuff in the branch have affected rendering. When I started the branch, I was also seeing artifacts on master, and removing i/o windows kinda helped. Now after a recent rebase they got worse in my branch, but seem better in master... > - combo boxes: mouse press + move on combo does not work, must click > and then move Hmm, it seems now combobox pops up on button release, in master too. Seems to have changed compared to gtk3-demo indeed. > - icon view basics: Scrolling the icon view verticaly doesn't > repaint correctly > - list box: click on expand button, then you can use enter to > activate it, then mouse to expand button on row below => hover, > now hit enter. the button scrolls away from the mouse, but > it doesn't unhover > - interactive overlay: buttons over entry get prelights and clicks > instead of the entry stealing them Hmm, the demo however sets the overlay as passthrough? https://git.gnome.org/browse/gtk+/tree/demos/gtk-demo/overlay.c#n60 > - popovers: The icons in the entry doesn't accept clicks, nor do the > calendar Yeah, both GtkEntry icons and calendars are b0rk so far. These bits rely too badly on properly laid out GdkWindows and event->any.window checks, so need a bit of a refactor besides input handling. > - tree view/list store - size allocation is broken, and "Fixed?" > checkbutton is not working Right, events on cell renderers in general are broken, didn't look too deep into this yet. > > Some code review: > > I worry about the GtkWidget::pick vfunc and the consistency of the > widget geometry. The implementation of gtk_widget_real_pick relies on > the widget hieararhy being correctly allocated, which is only true > directly after a layout pass. For instance, the current code will > re-pick immediately whenever the focus target is destroyed, which will > typically happen in the middle of some random code that changes > the widget hierarchy. You can't rely on the widget allocation at > this point. It may be uninitialized for new widgets, or just wrong > if some other widget got removed which will cause the widget to shift. Indeed, ::pick should check some invariants beforehand. And right, my next most fundamental change in the todo is tackling event compression differently, so GTK is given all received events, and performs frame-sync motion compression by default. In this picture, repicking should also be a delayed operation, so all generated crossing events are propagated in the same clock stage. > > In the current framework our events are based on GdkWindow positions, > and these are set at size allocation time and are valid until the next > size allocation, so it doesn't have this problem. > > I think picking fundamentally has to be tied to the layout cycle, we > can't just do it whenever we feel like it. For more thoughts about > this, see my previous review on this: > https://mail.gnome.org/archives/gtk-devel-list/2017-April/msg0.html I think we essentially agree :). > > The default picking system always treats widgets as rectangular. This > is a regression at least for GtkPopover, which currently uses input > shapes to get correct event handling for the rounded corners. However, > it strikes me that if we make it a slightly bit smarter we could > handle CSS corners in general vs input. For instance, we could have > "mouse enter" on a button with rounded corners only when the pointer > is actually inside the css box (i.e. not when its on the rounded part >
Re: How to in GTK3 set global default text size?
Done! I had copied changed settings.ini file to the folder /etc/gtk-3.0 in aplication folder and font size was updated in whole UI of application. 2017-05-16 16:58 GMT+03:00 Igor Chetverovod: > Hello, Emmanuele! > > In the installation sequence for windows there is a trap - msys2 version > for WinXP(my application is using this OS) is not more provided. So, I > can install only GTK3.6 version which was provided Tarnyko ( thanks to > him!) (http://www.tarnyko.net/dl/gtk.htm). > > Thank you, I will try GtkSettings. > > Best regards, > Igor > > > > > 2017-05-16 16:15 GMT+03:00 Emmanuele Bassi : > >> First of all, GTK+ 3.6.4 was released in January 2013, which means >> it's 4.5 years old and it's completely unsupported. >> >> The latest (long-term support) stable release is 3.22.15; please use >> that, especially if you're developing for Windows. >> >> Follow the instructions on the GTK+ website to know how to install on >> your development machine: >> >> https://www.gtk.org/download/windows.php >> >> then you can package up all the shared libraries and other assets when >> distributing your application. >> >> On 16 May 2017 at 14:04, Igor Chetverovod wrote: >> >> > I am making porting my own win32 application from GTK2 to GTK3.6.4. I >> have >> > an issue, for GTK3 all text labels on the user interface have a bigger >> > font size then for GTK2. Is there global setting which can control >> default >> > font size for UI elements? >> >> You can set a font size using a settings.ini file: >> >> https://developer.gnome.org/gtk3/stable/GtkSettings.html >> >> or you can control the font size for your application programmatically >> using the GtkSettings singleton. >> >> Ciao, >> Emmanuele. >> >> -- >> https://www.bassi.io >> [@] ebassi [@gmail.com] >> > > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to in GTK3 set global default text size?
Windows XP is a completely unsupported platform that just recently had a major vulnerability that exposed systems worldwide to ransomware, and it's well-known that state actors (and people who managed to get access to state actors tools) are still sitting on other vulnerabilities. GTK+ does *not* support Windows XP any more either; you're running an application using an unsupported version of a toolkit on an unsupported operating system. *Please* stop using or supporting Windows XP. Ciao, Emmanuele. On 16 May 2017 at 14:58, Igor Chetverovodwrote: > Hello, Emmanuele! > > In the installation sequence for windows there is a trap - msys2 version > for WinXP(my application is using this OS) is not more provided. So, I > can install only GTK3.6 version which was provided Tarnyko ( thanks to him!) > (http://www.tarnyko.net/dl/gtk.htm). > > Thank you, I will try GtkSettings. > > Best regards, > Igor > > > > > 2017-05-16 16:15 GMT+03:00 Emmanuele Bassi : >> >> First of all, GTK+ 3.6.4 was released in January 2013, which means >> it's 4.5 years old and it's completely unsupported. >> >> The latest (long-term support) stable release is 3.22.15; please use >> that, especially if you're developing for Windows. >> >> Follow the instructions on the GTK+ website to know how to install on >> your development machine: >> >> https://www.gtk.org/download/windows.php >> >> then you can package up all the shared libraries and other assets when >> distributing your application. >> >> On 16 May 2017 at 14:04, Igor Chetverovod wrote: >> >> > I am making porting my own win32 application from GTK2 to GTK3.6.4. I >> > have >> > an issue, for GTK3 all text labels on the user interface have a bigger >> > font size then for GTK2. Is there global setting which can control >> > default >> > font size for UI elements? >> >> You can set a font size using a settings.ini file: >> >> https://developer.gnome.org/gtk3/stable/GtkSettings.html >> >> or you can control the font size for your application programmatically >> using the GtkSettings singleton. >> >> Ciao, >> Emmanuele. >> >> -- >> https://www.bassi.io >> [@] ebassi [@gmail.com] > > -- https://www.bassi.io [@] ebassi [@gmail.com] ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to in GTK3 set global default text size?
Hello, Emmanuele! In the installation sequence for windows there is a trap - msys2 version for WinXP(my application is using this OS) is not more provided. So, I can install only GTK3.6 version which was provided Tarnyko ( thanks to him!) (http://www.tarnyko.net/dl/gtk.htm). Thank you, I will try GtkSettings. Best regards, Igor 2017-05-16 16:15 GMT+03:00 Emmanuele Bassi: > First of all, GTK+ 3.6.4 was released in January 2013, which means > it's 4.5 years old and it's completely unsupported. > > The latest (long-term support) stable release is 3.22.15; please use > that, especially if you're developing for Windows. > > Follow the instructions on the GTK+ website to know how to install on > your development machine: > > https://www.gtk.org/download/windows.php > > then you can package up all the shared libraries and other assets when > distributing your application. > > On 16 May 2017 at 14:04, Igor Chetverovod wrote: > > > I am making porting my own win32 application from GTK2 to GTK3.6.4. I > have > > an issue, for GTK3 all text labels on the user interface have a bigger > > font size then for GTK2. Is there global setting which can control > default > > font size for UI elements? > > You can set a font size using a settings.ini file: > > https://developer.gnome.org/gtk3/stable/GtkSettings.html > > or you can control the font size for your application programmatically > using the GtkSettings singleton. > > Ciao, > Emmanuele. > > -- > https://www.bassi.io > [@] ebassi [@gmail.com] > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to in GTK3 set global default text size?
First of all, GTK+ 3.6.4 was released in January 2013, which means it's 4.5 years old and it's completely unsupported. The latest (long-term support) stable release is 3.22.15; please use that, especially if you're developing for Windows. Follow the instructions on the GTK+ website to know how to install on your development machine: https://www.gtk.org/download/windows.php then you can package up all the shared libraries and other assets when distributing your application. On 16 May 2017 at 14:04, Igor Chetverovodwrote: > I am making porting my own win32 application from GTK2 to GTK3.6.4. I have > an issue, for GTK3 all text labels on the user interface have a bigger > font size then for GTK2. Is there global setting which can control default > font size for UI elements? You can set a font size using a settings.ini file: https://developer.gnome.org/gtk3/stable/GtkSettings.html or you can control the font size for your application programmatically using the GtkSettings singleton. Ciao, Emmanuele. -- https://www.bassi.io [@] ebassi [@gmail.com] ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
How to in GTK3 set global default text size?
Hello list, I am making porting my own win32 application from GTK2 to GTK3.6.4. I have an issue, for GTK3 all text labels on the user interface have a bigger font size then for GTK2. Is there global setting which can control default font size for UI elements? Best regards, Igor ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Review of wip/carlosg/event-delivery
I took a quick look at the wip/carlosg/event-delivery branch. Here are some things in the tests that seems broken from interactive testing: testgtk - click on close button gives: Gtk-CRITICAL **: _gtk_widget_captured_event: assertion 'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed This also happens in many other cases - button box: Click on button, hold down, mouse to other button => it prelights. Should not have gotten enter notify due to implicit grab. - eventbox: above child is not working - expander: Press on expander, mouse outside window, release, now the expander expands when you enter the window - panes: Resizing the pane doesn't work - spinbutton: clicking on the buttons in the spinbutton shows really weird prelight behaviour - spinbutton: Can't hold down button on spinbutton button to step - test scroll: Can't keep scrolling when cursor is outside toplevel (implicit grab not working) gtk4-demo: - After startup, if I click on last row ("Menus") it doesn't properly repaint the selected row - combo boxes: mouse press + move on combo does not work, must click and then move - icon view basics: Scrolling the icon view verticaly doesn't repaint correctly - list box: click on expand button, then you can use enter to activate it, then mouse to expand button on row below => hover, now hit enter. the button scrolls away from the mouse, but it doesn't unhover - interactive overlay: buttons over entry get prelights and clicks instead of the entry stealing them - popovers: The icons in the entry doesn't accept clicks, nor do the calendar - tree view/list store - size allocation is broken, and "Fixed?" checkbutton is not working Some code review: I worry about the GtkWidget::pick vfunc and the consistency of the widget geometry. The implementation of gtk_widget_real_pick relies on the widget hieararhy being correctly allocated, which is only true directly after a layout pass. For instance, the current code will re-pick immediately whenever the focus target is destroyed, which will typically happen in the middle of some random code that changes the widget hierarchy. You can't rely on the widget allocation at this point. It may be uninitialized for new widgets, or just wrong if some other widget got removed which will cause the widget to shift. In the current framework our events are based on GdkWindow positions, and these are set at size allocation time and are valid until the next size allocation, so it doesn't have this problem. I think picking fundamentally has to be tied to the layout cycle, we can't just do it whenever we feel like it. For more thoughts about this, see my previous review on this: https://mail.gnome.org/archives/gtk-devel-list/2017-April/msg0.html The default picking system always treats widgets as rectangular. This is a regression at least for GtkPopover, which currently uses input shapes to get correct event handling for the rounded corners. However, it strikes me that if we make it a slightly bit smarter we could handle CSS corners in general vs input. For instance, we could have "mouse enter" on a button with rounded corners only when the pointer is actually inside the css box (i.e. not when its on the rounded part of the corner). GtkPointerFocus is not refcounted, and is seemingly freed in various callbacks. I can't swear this is an issue, but it seems likely that we can run into cases where some code acesses it and then it gets freed due to some state change in a function call and when we get back we continue to access the freed object. The notify_types for the crossing events seem wrong: https://git.gnome.org/browse/gtk+/tree/gtk/gtkmain.c?h=wip/carlosg/event-delivery=c43ce71c21da075b53f1c00bd286e2ccfd1312aa#n1376 This sends the same notify type to all the widgets involved in the crossign events, which is not right. The first and last widget to get events should get different details. See this for the details: https://tronche.com/gui/x/xlib/events/input-focus/normal-and-grabbed.html This seems to cause issues like the one worked around by: https://git.gnome.org/browse/gtk+/commit/?h=wip/carlosg/event-delivery=0b569fd6827e1728c8dbf67440535dc87694983b I wonder if at some point we could move the map vfunc to the toplevel? Should any child widget ever need to do anything on map? -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Alexander LarssonRed Hat, Inc al...@redhat.comalexander.lars...@gmail.com He's a one-legged day-dreaming farmboy who hides his scarred face behind a mask. She's a vivacious cigar-chomping politician with the power to see death. They fight crime! ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list