gdk_window_get_pointer_() - "Invalid Memory Access"

Linux specific forum
DarkDragon
Addict
Addict
Posts: 2347
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

gdk_window_get_pointer_() - "Invalid Memory Access"

Post by DarkDragon »

Good afternoon,

Whatever I do with gdk_window_get_pointer_() I get an "Invalid Memory Access" Error thrown again my head. Here is a testcode:

Code: Select all

hWnd = OpenWindow(0, 0, 0, 640, 480, #PB_Window_SystemMenu, "Test")

x.l = 0 : y.l = 0
mask.l = 0

Repeat
  Event = WindowEvent()
 
  If gdk_window_get_pointer_(hWnd, @x, @y, @mask)
   
    If (mask & #GDK_BUTTON1_MASK)
      Debug "OK"
    EndIf
   
  EndIf
 
  Delay(15)
Until Event = #PB_Event_CloseWindow
End
Now I need your help.
bye,
Daniel
Fred
Administrator
Administrator
Posts: 18350
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

GdkWindow <> GtkWindow. You have to get the gdkwindow field of the GtkWidget structure (OpenWindow returns a GtkWindow*).
DarkDragon
Addict
Addict
Posts: 2347
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

OMG, I'm so stupid! Thanks for the help :roll: . It doesn't work yet, but I'll work on it(missing Structures)
bye,
Daniel
Fred
Administrator
Administrator
Posts: 18350
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

all gtk/gdk structures should be build-in in PB 3.94 for linux, just walk using the IDE's structure viewer.
DarkDragon
Addict
Addict
Posts: 2347
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Fred wrote:all gtk/gdk structures should be build-in in PB 3.94 for linux, just walk using the IDE's structure viewer.
I have PB 3.92, I'll go and get it, thanks.
bye,
Daniel
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

DarkDragon wrote:
Fred wrote:all gtk/gdk structures should be build-in in PB 3.94 for linux, just walk using the IDE's structure viewer.
I have PB 3.92, I'll go and get it, thanks.
You better edit that out before netmaestro sees it! :wink:
DarkDragon
Addict
Addict
Posts: 2347
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Trond wrote:
DarkDragon wrote:
Fred wrote:all gtk/gdk structures should be build-in in PB 3.94 for linux, just walk using the IDE's structure viewer.
I have PB 3.92, I'll go and get it, thanks.
You better edit that out before netmaestro sees it! :wink:
Why? I have no network on Linux, so it is hard for me to get updates, and I missed the last.
[EDIT]
Damnit, PB 3.94 doesn't work anymore(I mean the IDE)
[EDIT]
OK now it works O_o damn chmods.
[EDIT]
Structure GDKWindow still doesn't exist
[EDIT]
It works!!!
bye,
Daniel
Post Reply