Paul, On Wed, Feb 20, 2019 at 12:30 PM Paul Davis <paul@xxxxxxxxxxxxxxxxxxxxx> wrote: > > > > On Wed, Feb 20, 2019 at 11:10 AM Igor Korot <ikorot01@xxxxxxxxx> wrote: >> >> Hi, Paul, >> >> On Wed, Feb 20, 2019 at 12:03 PM Paul Davis <paul@xxxxxxxxxxxxxxxxxxxxx> wrote: >> > >> > >> > >> > On Wed, Feb 20, 2019 at 10:49 AM Igor Korot via gtk-list <gtk-list@xxxxxxxxx> wrote: >> >> >> >> >> >> Why do we even talking about button number, when the doc explicitly said >> >> "right-click", which implies "right mouse button". >> > >> > >> > X Window (at the very least) allows buttons to be remapped. Button #1 is typically the left mouse button, but a user may remap them (eg. left-handed people with a strong preference for using the mouse in their left hand). "left" and "right" buttons normally have a semantic meaning (e.g. "the button normally used for clicking on things" vs "the button used for context menus etc.") and you cannot hard code these on X Window. More precisely, if you do hard code them, you disenfranchise a set of users who remap their mouse buttons. >> >> Are you saying that if I map the left mouse button to be the right one >> and click on it, I will not get that signal? >> >> As far as the user code is concerned, the button I press to get the >> context menu shouldn't matter, because this a low-level signal. >> All the user code should be aware is - did I click the action button >> or context menu one. Why do I need to care which is which? >> >> Could you give me a scenario? > > > hold the mouse in your right hand. put your index finger on the most naturally positioned button. press it. > > by default, X Window will generate a mouse button event using button number one. > > now put the mouse in your left hand, put that index finger on the most naturally positioned button, press it. > > by default, X Window will generate a mouse button event using button number three. > > programmers don't want to deal with this in their code, so they generally assume that button #1 is "left button" and button #3 is "right button". > > but what they really mean is "button used for most button clicks" and "button used for context clicks" > > a dedicated left-handed user may remap this so that their left index finger correctly generates button 1 - the button used for most clicks. > > your code can assume that 1 => most clicks; 3 => context click > > it cannot assume that 1 => left ; 3 => right This is all correct and I'm not arguing about that. What I do argue is why the context-menu event should care what mouse button click it comes from? Let's say I'm using GTK and writing a software. Why should I care which button click generated my CSM? As long as I get the event/message/signal I should be happy and will write a handler where I will construct the menu and display it. The user can click the AUX1 button for all I care. But if this button is not mapped correctly by the system to generate "right-button click", this event/signal will never arrive/fire. Am I missing something? What is the scenario where user code needs to know if the button pressed was 1, 3 or it was a keyboard altogether (-1)? Thank you. > > _______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx https://mail.gnome.org/mailman/listinfo/gtk-list