LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-30-2010, 08:23 PM   #1
tron_thomas
Member
 
Registered: May 2004
Posts: 221

Rep: Reputation: 30
XGrabPointer prevents Alt+Tab application switching


I'm writing a game for Linux using Xlib whereby when a window becomes active it will take control of the mouse using XGrabPointer. The idea being that if the users switches applications through Alt+Tab the game will relinquish the mouse with a call to XUngrabPointer.

The game is using the FocusIn event to determine when it has been activated and needs to grab the mouse, and likewise uses the FocusOut event to release the mouse. This causes a problem because for some reason an Alt+Tab from the keyboards generates two FocusOut events and then a FocusIn event causing the game to take control and no application switching occurs.

If the game does not grab the mouse, then application switching works fine.

What is needed so that application switching can work while the game has control of the mouse?

I am running Fedora 12 on an Intel Core2 Duo machine. I am also using Compiz as the window manager.
 
Old 01-31-2010, 04:11 PM   #2
tron_thomas
Member
 
Registered: May 2004
Posts: 221

Original Poster
Rep: Reputation: 30
It looks like the application switching problem is definitely related to the Compiz window manager.

I found that if I hold Alt+Tab down on the keyboard for a few seconds, the window manager will actually start cycling through the various application windows on the desktop. Also, if I switch the window manager to Metacity, task switching works just fine.

I understand that Compiz is still in beta or alpha, and is not an official release yet. I have version 0.8.2-19.fc12.

I'm wondering if I should submit a bug and where I would go to do such a thing.

What do people think?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
alt+tab switching in KDE? lugoteehalt Linux - Desktop 3 10-04-2008 07:10 AM
Switching window focus (like alt+tab in windows) and Ctrl+Alt+F1 X windows problem... DiZASTiX Linux - Software 3 01-20-2005 04:56 PM
Sticky alt-tab when switching apps Cesar Ocasio Fedora 2 07-19-2004 10:56 PM
KDE task switching (alt-tab) problem, also KDE XMMS problem (seperate problems) Cohobin Linux - Software 4 06-26-2004 05:47 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration