Questions tagged [gdk]

Used to tag things that relate to the GIMP Drawing Kit. The GIMP Drawing Kit is the low-level library that provides platform abstraction for the GTK+ widget toolkit.

Best used to tag things that relate to the GIMP Drawing Kit.

Unfortunately there's some overlap with which deals with the (Google) Glass Development Kit.

317 questions
3
votes
1 answer

Gtk does not save text to the clipboard if I close the app right after

I'm new to Gnome development. I am trying do create a button which, when pressed, will copy the content of its label to the clipboard and closes the app. This is my code, where "self" is a class that extends Gtk.Window. If I don't close the app, it…
mijorus
  • 111
  • 1
  • 7
3
votes
2 answers

GDK events handling without GTK

I'm programming (in python) GDK without GTK, simply as a x11 abstraction. THIS POST IS MY LAST CHANCE. My problem is that I don't know how capture the GDK window's signals/events or what are their names. When I do: window = gdk.Window( …
user504806
3
votes
0 answers

How to get the WNCK window that a known GDK Window belongs to?

I'd like to know some process info of a window that WNCK could provide. But I do not know the WNCK window, instead, I have a GDK window at hand, which may be a sub part of the WNCK window. How could I get to the WNCK window from the GDK window?
Magicloud
  • 818
  • 1
  • 7
  • 17
3
votes
1 answer

Problem with gdk.Pixbuf in gtk# Mono

I'm creating a small drawing program in Mono gtk# and using the Cairo graphics library. I'm coding and compiling on a MacOs X system. I have a drawable object which I put into Pixbuf at a certain time and then retrieve it later into the drawable…
Oli Oskar
  • 33
  • 7
3
votes
1 answer

Gtk+: How to set the cursor of a window from a Cairo context?

I have written the following code to set the cursor of a Gtk::Window from a Cairo::Context. When I run the program and move the cursor into the window, the cursor changes to a horizontal black line at the top, followed by some undefinable white…
Oswald
  • 31,254
  • 3
  • 43
  • 68
3
votes
2 answers

Keyboard/Mouse events on desktop / root window with pygtk (gtk.gdk) on Linux

As the title states, I'm trying to capture Mouse and Keyboard events with Python-gtk. I can do this easily with python-xlib with: self.display = display.Display() self.screen = self.display.screen() self.root_window = self.screen.root …
digitalfoo
  • 1,165
  • 13
  • 14
3
votes
0 answers

GdkX11 changes take effect only after second call to get_active_window()

I have very simple script to move a currently active window from gi.repository import GdkX11,Gdk,Gtk screen = GdkX11.X11Screen.get_default() # use width and height on this one #work_area = screen.get_monitor_workarea(0) #active_window_xid =…
Sergiy Kolodyazhnyy
  • 938
  • 1
  • 13
  • 41
3
votes
2 answers

Can a GDK Pixbuf be rotated by something less than 90 degrees?

I have a Pixbuf in some demo code I have and I currently rotate it clockwise or counter-clockwise depending on screen touches. I do this using RotateSimple but that is limited to multiples of 90 degrees. Is there a way within GDK to rotate images in…
paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
3
votes
0 answers

Gnome double click on touchscreen

I can't get double clicking to work on a Surface Pro 3 (Fedora; Kernel 4.28; Gnome 3.18, Gtk3). Two fast consecutive taps are not converted to a 2button event in Gtk+. See the small Python program below, which works fine for a normal mouse or touch…
cass
  • 309
  • 1
  • 5
  • 14
3
votes
2 answers

Gdk / X11 Screen Capture

I want to write a program that continuously captures the screen and does some modifications to the image. A complete test program can be found at: https://gist.github.com/blogsh/eb4dd4b96aca468c8bfa However, I ran into some problems. The first…
blogsh
  • 145
  • 2
  • 4
3
votes
2 answers

Getting keyboard modifiers state using Gnome libs (GDK) fetches initial state only

I'm trying to get the current keyboard modifiers state through gnome GDK or GTK library in aim to implement an accessibility gnome shell extension that shows that state. I know how to get thier state using xlib, but there is not full binding for…
user.dz
  • 962
  • 2
  • 19
  • 39
3
votes
1 answer

How to edit pixels of a pixbuf in Python/Gdk

I'm using Python and GDK to load an image: Pixbuf = GdkPixbuf.Pixbuf.new_from_file(filename) I then want to edit pixels of this pixbuf and display it on a GTKImage. Here's what I tried: pixList = Pixbuf.get_pixels() then: Pixbuf =…
Adrien Neveu
  • 827
  • 1
  • 15
  • 28
3
votes
1 answer

How to get window xid in Vala using Gdk.X11.Window?

I am using GStreamer in my program, and I need to get window xid to use it. I have working solution now, but it's deprecated (I am using Gdk.X11Window now). How can I do the same but using Gdk.X11.Window so it won't be deprecated? Here is what I'm…
serge1peshcoff
  • 4,342
  • 11
  • 45
  • 76
3
votes
0 answers

X11: invalid Alt/Meta key config? / GTK+: said key not mapped by gdk_keymap_add_virtual_modifiers()? / KDE: bogus complaint about key?

NOTE See the updates below; weirder things have come up now. I'm interpreting the GdkEvent***.state field in my various mouse event handlers as so: gdk_keymap_add_virtual_modifiers( gdk_keymap_get_for_display(gdk_window_get_display(e.window)), …
andlabs
  • 11,290
  • 1
  • 31
  • 52
3
votes
2 answers

Cairo.ImageSurface to Gdk.Pixbuf?

Attempting to create a Pixbuf from an ImageSurface, but all I get are black pixels. Any ideas? Cairo.ImageSurface surface = mysurface; int w = surface.Width; int h = surface.Height; Gdk.Pixmap pixmap = new Gdk.Pixmap(null, w, h, 24); using…
Doug Blank
  • 2,031
  • 18
  • 36
1 2
3
21 22