From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: border1.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!news.stack.nl!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Mouse Clicks in a Drawing Area Date: Tue, 4 Feb 2014 09:52:16 +0100 Organization: cbb software GmbH Message-ID: References: <52f08d46$0$9122$703f8584@news.kpn.nl> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: I5Na6+WsEzT8WoegI0VZTA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: number.nntp.dca.giganews.com comp.lang.ada:184644 Date: 2014-02-04T09:52:16+01:00 List-Id: On Tue, 4 Feb 2014 07:46:51 +0100, ldries46 wrote: > I do want to draw something at a certain point in a Drawing_Area. That point > should be derived from a mouse click. > To do this I have created a handler "On Button_Press". [...] > Both program build faultless. > I put a breakpoint inside the On_Button_Press function at a point where it > should always be reached. > Running the program and clicking within the drawn area that breakpoint is > never reached and the program runs without reporting an error. > I am using Gtk 3.4 and GPS. > What do I do wrong? By default the button-press-event and the button-release-event signals are filtered out for a widget. See: https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget-button-press-event You must enable their propagation in order to be able to handle them. Use Set_Events for this purpose on the widget with the appropriate event mask. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de